GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  GANTRY::UTILS::CAPTCHA (3)

.ds Aq ’

NAME

Gantry::Utils::Captcha - a way to mange captchas

CONTENTS

SYNOPSIS



    my $captcha = Gantry::Utils::Captcha->new( h2xsg );
   
    $captcha->add( {
        base_url => $self->doc_rootp() . "/images",
        image    => captcha-image-1.jpg, 
        key      => chair,
        label    => looks like a chair to me,
        alt_text => sometimes it feels reaally good to sit,                
    } );

    $captcha->add( {
        base_url  => $self->doc_rootp() . "/images",
        image     => captcha-image-2.jpg,
        key       => yoda,
        label     => hrm ... yoda you are,
        alt_text  => use the force, Luke,               
    } );

    $captcha->add( {
        base_url  => $self->doc_rootp() . "/images",
        image     => captcha-image-3.jpg,
        key       => biking,
        label     => biking is fun,
        alt_text  => two wheels and a seat,
    } );

    or
   
    my $captcha = Gantry::Utils::Captcha->new(
        h2xs,
        [
            {
                base_url  => $self->doc_rootp() . "/images",
                image     => captcha-image-3.jpg,
                key       => biking,
                label     => biking is fun,
                alt_text  => two wheels and a seat,
            }       
        ]
    );



DESCRIPTION

This module is a utility to help with captchas.

METHODS

new( [secret encryption key] ) Standard constructor, call it first.

Requires the following parameter



    secret       # this is your super secret encryption key



add( { ... } ) add a captcha item

Requires the following parameter



     image       # the image i.e. myimage.gif
     key         # the unique key for this captcha
     label       # the question that will appear in the select box



Optional



    alt_text     # the alt text for the image
    base_url     # a base url



shuffle Shuffle the captchas and set one in the queue
valid( [captcha form param value] ); Tests to the captcha’s encrypted string with the key and returns true of false
key Return the captcha’s key for the queued chaptcha
base_url Returns the captcha’s base url for the queued chaptcha
image Returns the captcha’s image for the queued chaptcha
label Returns the captcha’s label for the queued chaptcha
alt_text Returns the captcha’s alt_text for the queued chaptcha
crypt_string Returns the captcha’s crypt_string for the queued chaptcha
gantry_form_options returns a reference to an array of form options that can be passed directly to form.tt
image_link Returns the captcha’s image link

SEE ALSO

Gantry(3)

LIMITATIONS

This module depends on Gantry(3)

AUTHOR

Tim Keefer <tkeefer@gmail.com>

COPYRIGHT and LICENSE

Copyright (c) 2005-7, Tim Keefer.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 GANTRY::UTILS::CAPTCHA (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.