NAME
Google::reCAPTCHA - A simple lightweight implementation of Google's reCAPTCHA for perl
SYNOPSIS
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
}
GETTING STARTED
To use reCAPTCHA you need to register your site here:
https://www.google.com/recaptcha/admin/create
PUBLIC INTERFACE
Google::reCAPTCHA->new( secret => 'secret_key' )
Our constructor, will croak when invalid parameters are given.
secret
Required. The shared key between your site and ReCAPTCHA.
siteverify( response => 'response_key', remoteip => '192.168.0.1' )
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.
Errors
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.
Git repo
https://bitbucket.org/tcorkran/google-recaptcha
VERSION
0.06
AUTHOR
Thomas Corkran <thomascorkran@gmail.com>
CONTRIBUTORS
Christopher Mevissen <mev412@gmail.com>
ACKNOWLEDGEMENTS
Matthew Green <green.matt.na@gmail.com>
---
This projects work was sponsored by Hostgator.com.
COPYRIGHT & LICENSE
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.