View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Jonathan Brown > Captcha-AreYouAHuman > Captcha::AreYouAHuman



Annotate this POD

View/Report Bugs
Module Version: 4e-05   Source  


Captcha::AreYouAHuman - Integrate the 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!



Arguments: %params

Create a new Captcha::AreYouAHuman object.


Sets the server name to use; if not specified, defaults to


(Required) Publisher key as provided by the portal when you register a domain.


(Required) Scoring key as provided by the portal when you register a domain.


Returns HTML to be output to browser.


Arguments: %params

Scores a game play; returns true on pass, false otherwise.


(Required) The value of the form input <session_secret>


(Required) The remote client IP.


Arguments: %params

Returns HTML for display to the client to record a conversion.


(Required) The value of the form input <session_secret>


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 <>

Heavily based on the Captcha::PeopleSign Perl library by Michele Beltrame.


Copyright (c) 2011, 2012

This module is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself. See perlartistic.

syntax highlighting: