Authen::PluggableCaptcha::TutorialAuthen::PluggableCaptcha::Tutorial contains a tutorial about how to use the Captcha System. | |
Download |
Authen::PluggableCaptcha::Tutorial Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Jonathan Vanasco
- Publisher web site:
- http://search.cpan.org/~jvanasco/Authen-PluggableCaptcha-0.05/lib/Authen/PluggableCaptcha/Tutorial.pm
Authen::PluggableCaptcha::Tutorial Tags
Authen::PluggableCaptcha::Tutorial Description
Authen::PluggableCaptcha::Tutorial contains a tutorial about how to use the Captcha System. Authen::PluggableCaptcha::Tutorial contains a tutorial about how to use the captcha system.Generate a New Key... my $captcha= Authen::PluggableCaptcha->new( type=>'new' , seed=> 'a' , site_secret=> 'z' ); my $captcha_publickey= $captcha->get_publickey();Generate a JPEG... my $captcha= Authen::PluggableCaptcha->new( type=> 'existing' , publickey=> $captcha_publickey, seed=> 'a' , site_secret=> 'z' ); my $as_string= $captcha->render( challenge_class=> 'Authen::PluggableCaptcha::Challenge::TypeString', render_class=>'Authen::PluggableCaptcha::Render::Image::Imager' , font_filename=> '/usr/X11R6/lib/X11/fonts/TTF/VeraMoIt.ttf', format=>'jpeg' ); # serve it directly, or write it open(WRITE, ">/path/to/dest.jpg"); print WRITE $as_string; close(WRITE);Generate an obfuscated HTML item...again, create a new object my $captcha= Authen::PluggableCaptcha->new( type=> 'existing' , publickey=> $captcha_publickey, seed=> 'a' , site_secret=> 'z' );render it my $as_string= $captcha->render( challenge_class=> 'Authen::PluggableCaptcha::Challenge::DoMath', render_class=>'Authen::PluggableCaptcha::Render::Text::HTML' );now you can serve it directly, or write it-- its just html text.note: if you put it into Tal or some other formats, it must be marked as a 'structure'alternately, you could render with Authen::PluggableCaptcha::Render::Text::Plain, which does no obfuscation (bad! bad! bad!) open(WRITE, ">/path/to/dest.html"); print WRITE $as_string; close(WRITE); Requirements: · Perl
Authen::PluggableCaptcha::Tutorial Related Software