my $c = Captcha::reCAPTCHA->new;
$template->param(CAPTCHA => $c->get_html( 'mypubkeyitookout' ));
my $result = $c->check_answer(
'myprivkeyitookout', $ENV{'REMOTE_ADDR'},
my $challenge = $query->param("recaptcha_challenge_field"), my
$response = $query->param("recaptcha_response_field")
);
if ( $result->{is_valid} ) {
print "Yes!";
}
else {
# Error
my $error = $result->{error};
}
ok i managed to get this to load, now is there a way to make the print
yes load a page? when i hit submit it goes to an error. of
[Wed Jun 24 12:05:55 2009] [error] [client 192.168.1.5] Use of
uninitialized value in concatenation (.) or string at MinimalApp.pm line
22., referer: http://192.168.1.9/cgi-bin/index.pl?rm=registration
[Wed Jun 24 12:05:55 2009] [error] [client 192.168.1.5] Use of
uninitialized value in concatenation (.) or string at MinimalApp.pm line
24., referer: http://192.168.1.9/cgi-bin/index.pl?rm=registration
[Wed Jun 24 12:05:55 2009] [error] [client 192.168.1.5] Error executing
run mode 'index': HTML::Template : Attempt to set nonexistent parameter
'captcha' - this parameter name doesn't match any declarations $
[Wed Jun 24 12:05:55 2009] [error] [client 192.168.1.5] at
/usr/lib/cgi-bin/index.pl line 4, referer:
http://192.168.1.9/cgi-bin/index.pl?rm=registration
[Wed Jun 24 12:05:55 2009] [error] [client 192.168.1.5] Premature end of
script headers: index.pl, referer:
http://192.168.1.9/cgi-bin/index.pl?rm=registration
which im assuming its creating a captcha and i just need to handle it.
ill get this i think im close.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/