Captcha::AreYouAHuman - Integrate the AreYouAHuman.com CAPTCHA alternative human verification into your Perl application
use Captcha::AreYouAHuman; my $publisher_key = "BAADBEEFBAADBEEF"; my $scoring_key = "BEEFBEEFBEEFBEEF"; my $ayah = new Captcha::AreYouAHuman( "publisher_key" => $publisher_key, "scoring_key" => $scoring_key ); # output a form print $ayah->getPublisherHTML(); # score the result; use CGI; my $cgi = new CGI; my $result = $ayah->scoreResult( "session_secret" => $cgi->param('session_secret'), "client_ip" => $cgi->remote_host() ); if ($result) { print "You're a human!\n"; } else { print "Not a human\n": } # eecho a hidden iframe for conversion tracking print $ayah->recordConversion( "session_secret" => $cgi->param('session_secret') );
CAPTCHA's suck. Are You a Human's PlayThru is a CAPTCHA alternative that replaces the twisted, distorted text with games.
PlayThru replaces the awful user experience of normal CAPTCHAs with short and simple games. They are easy for your users and difficult for bots to break.
Are You a Human's PlayThru provides security for your site's comments and registration sections. It is easy to install and difficult for spammers to circumvent. We collect lots of data about how a visitor plays our game, which we feed into our algorithm to continuously improve our security. Please learn more about PlayThru at the Are You a Human website.
Installing PlayThru requires a Publisher Key, which can be acquired from the Are You a Human publisher portal. To get your publisher key, please create an account on our registration page.
We love feedback and would like to hear from you. Please leave us some on our support forum. We also like to get some shout outs on our Facebook page.
Thank you and fight bots with fun!
http://areyouahuman.com
new
Arguments: %params
Create a new Captcha::AreYouAHuman object.
Captcha::AreYouAHuman
server
Sets the server name to use; if not specified, defaults to ws.areyouahuman.com.
publisher_key
(Required) Publisher key as provided by the areyouahuman.com portal when you register a domain.
scoring_key
(Required) Scoring key as provided by the areyouahuman.com portal when you register a domain.
getPublisherHTML
Returns HTML to be output to browser.
scoreResult
Scores a game play; returns true on pass, false otherwise.
session_secret
(Required) The value of the form input <session_secret>
client_ip
(Required) The remote client IP.
recordConversion
Returns HTML for display to the client to record a conversion.
errorLog
Arguments: $string to record to the error log
Handles an error log; for default, it will send to STDERR.
To use Are You a Human, sign up as a publisher here:
Once you register your domain, you will receive a publisher key and a scoring key. Pass these as parameters to the constructor.
Jonathan Brown <jonathan@areyouahuman.com>
<jonathan@areyouahuman.com>
Heavily based on the Captcha::PeopleSign Perl library by Michele Beltrame.
Copyright (c) 2011 AreYouAHuman.com
This module is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself. See perlartistic.
To install Captcha::AreYouAHuman, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Captcha::AreYouAHuman
CPAN shell
perl -MCPAN -e shell install Captcha::AreYouAHuman
For more information on module installation, please visit the detailed CPAN module installation guide.