Captcha Numbers: Generate CAPTCHA validation images

Recommend this page to a friend!
  Info   Screenshots   View files (4)   Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
59%Total: 3,273 All time: 1,055 This week: 341
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: 36
All time rank: 31434 in United States United States
Week rank: 713 74 in United States United States

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
File Role Description
captcha_numbers.php Class Main Class
example.php Example Image displayer
loginexample.php Example Login Form Example
readme.txt Doc. Readme

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:1,055
This week:341
 User Ratings  
 All time

For more information send a message to info at phpclasses dot org.