PHP Classes

Captcha Numbers: Generate CAPTCHA validation images

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   Screenshots Screenshots   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2005-09-29 (10 years ago) RSS 2.0 feedStarStarStar 59%Total: 3,259 All time: 1,024 This week: 1,152Down
Version License Categories  
captchanumbers 1.0.0GNU General Publi...Graphics, Validation, Security
Description Author  

This class can generate images for use in CAPTCHA based validation tests (Completely Automated Public Turing test to tell Computers from Humans Apart).

It can generate an image with a random sequence of numbers over a grid of lines. The numbers and the grid are rendered in configurable colors. The numbers are rendered using a given TrueType font.

The image can be generated in either GIF, JPEG or PNG formats. The default format is PNG.

Picture of Hadar Porat
Name: Hadar Porat <contact>
Classes: 5 packages by
Country: United States United States
Age: 32
All time rank: 30732 in United States United States
Week rank: 898 Down101 in United States United States Down

GD2 Problems
You must have GD2 module installed with PHP.
If u get imagecreate() not found, it's means you don't have GD2 installed.

You can install it easly on windows by open php.ini and uncomment extension=php_gd2.dll line. Also check that extension_dir in php.ini is correct.

Font Problems
You must have arial.ttf available for the script to work.

If the picture is shown without numbers (only grid) u need to download
arial.ttf from

Save arial.ttf in the same directory of the script. Notice it's arial.ttf
and not Arial.ttf.

  • screen1.jpg
  Files folder image Files  
File Role Description
Plain text file captcha_numbers.php Class Main Class
Plain text file example.php Example Image displayer
Plain text file loginexample.php Example Login Form Example
Plain text file readme.txt Doc. Readme

 Version Control Unique User Downloads Download Rankings  
 0%Total:3,259All time:1,024
 This week:0This week:1,152Down
 User Ratings  
 All time