Post from Perl script

1 view
Skip to first unread message

paullanders

unread,
Aug 9, 2008, 5:10:31 PM8/9/08
to JustHumans
Hi.

I run a forum built on Perl that I wanted to use justhumans to control
spam from the registration page. The form section of the perl
registration script is here:

<form action="$surl\lv-register/p-2/" id="register" method="post">
<table cellspacing="1" cellpadding="5" class="border" width="100%">
<tr>
.
.
.
.
<td class="win" style="padding: 8px"><input type="submit"
value="&nbsp;&nbsp;$ registertxt[3]&nbsp;&nbsp;" /><</tr>
</table>
</form>


Here are my changes:

<form method="post">
<table cellspacing="1" cellpadding="5" class="border" width="100%">
<tr>
.
.
.
.
<td class="win" style="padding: 8px"><script language="JavaScript"
src="http://verify.justhumans.com/verification.js?
k=reallylongrandomnumber"></script></tr>
</table>
</form>

When I try to register the result page says no fields were filled out.

Thank you!

Anders Brownworth

unread,
Aug 9, 2008, 5:26:03 PM8/9/08
to justh...@googlegroups.com
Paul,

I think this depends on what you want to have happen on a submit. If your script does something interesting like posts the form fields into a database of yours, then you probably want to investigate the repost capabilities of JustHumans. If all you need is an email when the form is posted, you could rely on JustHumans for that and forget the script.

I'll guess your script actually does something interesting though and therefore you need the fields actually posted to your perl script. The way this happens in JustHumans is this. A user fills out your form and clicks an image to submit. The post goes to JustHumans and is checked to make sure the proper picture is clicked. If so, it follows the list of things you have set up for that form in JustHumans. We'll say you have "email me" and "Re-post URL" selected. An email will go out to you as you would expect. Then JustHumans will create a new POST request to the URL given in the "Re-post URL" section and re-submit all of your form fields. Then the user will be redirected to the "thank you" page and the process is complete.

So this implies that all posts to your perl script will come from one IP address, the JustHumans verification server. It won't have any cookies you might have set for the user or anything like that. It is not meant to be attached to that user, it is only done this way so your actual POST URL is kept as a secret and never released into the wild where a spammer might be able to see it and start sending spam postings.

Does that get at the heart of the issue you are having or am I way off base?

-Anders
--
-Anders
-----------------------------------------------------------
Anders Brownworth
http://www.anders.com/
ande...@gmail.com

Paul Landers

unread,
Aug 9, 2008, 7:03:27 PM8/9/08
to justh...@googlegroups.com
Hi Anders.

Thank you for your reply.

Actually I am not the author of the forum software itself, so I am just attempting to discover exactly how to modify the form to work with justhumans.  I suspect my problem was that I had no repost URL chosen because I could not derive from the perl script what URL to use.  Judging from the form action the URL looks to be derived from a variable:


<form action="$surl\lv-register/p-2/" id="register" method="post">

So, would justhumans accept the variable in a URL or would I need to discover the actual URL?  Also, how do I handle the id="register" directive?

Thank you again!

Anders Brownworth

unread,
Aug 9, 2008, 10:34:50 PM8/9/08
to justh...@googlegroups.com
Paul,

JustHumans would not know what the variable should be set to so my suggestion would be to look at the HTML that gets generated via "view source" in a web browser and go from that.

Now of course this implies that you can actually do what you are trying to do. The post to to your forum would come from the JustHumams verification server and not that web browser so unless the forum software doesn't require cookies and just keeps everything as post variables (which would be very unusual) you can't use JustHumans for this.

What forum software are you using?

-Anders

Sent from my iPhone

Paul Landers

unread,
Aug 10, 2008, 4:49:06 PM8/10/08
to justh...@googlegroups.com
Thanks, Anders!

I'm using eblah:      http://www.eblah.com
Reply all
Reply to author
Forward
0 new messages