Google::reCAPTCHA - A simple lightweight implementation of Google's reCAPTCHA for perl
use Google::reCAPTCHA; my $c = Google::reCAPTCHA->new( secret => 'secret_key' ); # Verifying the user's response my $success = $c->siteverify( response => 'response_key', remoteip => '192.168.0.1' ); if( $success ) { # CAPTCHA was valid }
To use reCAPTCHA you need to register your site here:
https://www.google.com/recaptcha/admin/create
Our constructor, will croak when invalid parameters are given.
secret
Required. The shared key between your site and ReCAPTCHA.
Request siteverify from Google reCAPTCHA API
response
Required. Form data containing g_captcha_response.
remoteip
Optional. User's ip address. Both IPv4 and IPv6 is supported.
Error code reference:
missing-input-secret - The secret parameter is missing.
invalid-input-secret - The secret parameter is invalid or malformed.
missing-input-response - The response parameter is missing.
invalid-input-response - The response parameter is invalid or malformed.
https://bitbucket.org/tcorkran/google-recaptcha
0.06
Thomas Corkran <thomascorkran@gmail.com>
<thomascorkran@gmail.com>
Christopher Mevissen <mev412@gmail.com>
<mev412@gmail.com>
Matthew Green <green.matt.na@gmail.com>
<green.matt.na@gmail.com>
---
This projects work was sponsored by Hostgator.com.
http://www.hostgator.com
http://www.endurance.com
Copyright 2015, Thomas Corkran <thomascorkran@gmail.com>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Google::reCAPTCHA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Google::reCAPTCHA
CPAN shell
perl -MCPAN -e shell install Google::reCAPTCHA
For more information on module installation, please visit the detailed CPAN module installation guide.