CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
reCaptcha

 



tokyorelo
New User

Jul 31, 2012, 4:14 PM

Post #1 of 2 (822 views)
reCaptcha Can't Post

Hi, new guy I be.

Trying to set up reCaptcha on my site using Perl.

On my forms html page, when I try and put the following code in, I am immediately getting an error from expressions web 4.0

use Captcha::reCAPTCHA;
my $c = Captcha::reCAPTCHA->new;

I have installed the perl module for it. The '>' in that last line before the word 'new' is causing my entire html page to go all wonky, saying tags don't match.

I have that code before any tags, even the <html> tag. What do I need to do? Is this just the expression web software not understanding the perl coding, and something I can just ignore?

I hope I have given enough information here. Let me know if I can post more to help figure this out.

Thanks for helping a beginner. Really appreciate it.


(This post was edited by tokyorelo on Jul 31, 2012, 4:21 PM)


wickedxter
User

Jul 31, 2012, 6:01 PM

Post #2 of 2 (809 views)
Re: [tokyorelo] reCaptcha [In reply to] Can't Post

In order for this to work you'll have to print the html from the Perl script for it to be interpolated

captcha.pl

Code
use strict; 
use warnings;
use Captcha::ReCAPTCHA;

my $c = Captcha::ReCAPTCHA->new;

print <<HTML

<html>
<title>Captcha</title>
$c->get_html( 'your public key here' );
</html>

HTML;


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives