PHP Classes
elePHPant
Icontem

HN CAPTCHA: Generate a form or formpart with a CAPTCHA picture

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (10)   DownloadInstall with Composer Download .zip   Reputation   Support forum (19)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2009-04-30 (8 years ago) RSS 2.0 feedStarStarStarStar 64%Total: 14,729 All time: 63 This week: 644Down
Version License PHP version Categories
hn_captcha 1.5.0GNU Lesser Genera...4.1.0HTML, Graphics, Validation, Security
Description Author

This class generates a picture to use in forms that perform CAPTCHA test (Completely Automated Public Turing to tell Computers from Humans Apart). After the test form is submitted a key entered by the user in a text field is compared by the class to determine whether it matches the text in the picture.

The class is a fork of the original released also in this site by Julien Pachet with the name ocr_captcha.

The following enhancements were added:

- Support to make it work with GD library before version 2
- Hacking prevention
- Optional use of Web safe colors
- Limit the number of users attempts
- Display an optional refresh link to generate a new picture with a different key without counting to the user attempts limit verification
- Support the use of multiple random TrueType fonts
- Control the output image by only three parameters: number of text characters and minimum and maximum size preserving the size proportion
- Preserve all request parameters passed to the page via the GET method, so the CAPTCHA test can be added to existing scripts with minimal changes
- Added a debug option for testing the current configuration

All the configuration settings are passed to the class in an array when the object instance is initialized.

The class only needs two function calls to be used: display_form() and validate_submit().

Optional-Class-Extensions:
hn_captcha_X1: add a garbage collector (for 'lost' images) to main class.

Since 24 December 2007, there are different classfiles for PHP 4 and PHP 5, ( merry x-mass <<<-| )

Name: Horst Nogajski <contact>
Classes: 7 packages by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 1x

Screenshots  
  • hn_captcha/example_images.jpg
  Files folder image Files  
File Role Description
Files folder imagehn_captcha (10 files)

  Files folder image Files  /  hn_captcha  
File Role Description
  Plain text file hn_captcha.class.php Class switch to main class PHP 4 / 5
  Plain text file hn_captcha.class.php4 Class Main Class for PHP 4
  Plain text file hn_captcha.class.php5 Class Main Class for PHP 5
  Plain text file hn_captcha.class.x1.php Class switch to extension class PHP 4 / 5
  Plain text file hn_captcha.class.x1.php4 Class class extension that add a garbage collector to main class
  Plain text file hn_captcha.class.x1.php5 Class class extension that add a garbage collector to main class
  Plain text file hn_captcha.example.php Example Example for the main class
  Plain text file hn_captcha.example_formpart.php Example an example how to use the captcha test with existing Forms.
  Plain text file hn_captcha.example_formpart2.php Example another example of usage with existing forms
  Plain text file hn_captcha.x1.example.php Example Example for the garbage collector extension

 Version Control Unique User Downloads Download Rankings  
 0%
Total:14,729
This week:0
All time:63
This week:644Down
User Ratings User Comments (5)
 All time
Utility:94%StarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:-
Examples:87%StarStarStarStarStar
Tests:-
Videos:-
Overall:64%StarStarStarStar
Rank:814