PHP Classes

SecurityImage: Generate images for CAPTCHA validation

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 412 All time: 6,453 This week: 261Up
Version License PHP version Categories
andrewsecurityimage 1.3GNU General Publi...4.0Graphics, Validation, Security


This class can be used to generate images for CAPTCHA validation.

It creates a random text with a limited length of letters and digits and renders it in an image using one of several possible TrueType fonts.

Several background images may be used randomly to obfuscate the text.

The class also renders random circles to also obfuscate the text.

The image is generated in PNG format as the current script output.

Picture of Andrew
Name: Andrew <contact>
Classes: 4 packages by
Country: United Kingdom
Age: ???
All time rank: 17810 in United Kingdom
Week rank: 398 Down9 in United Kingdom Up
Innovation award
Innovation award
Nominee: 1x


Security Images (captcha) --------------- Author: A.D.Surrey Website: Licence: GPL (Free, use it for anything u wish) This class implements security images in PHP using GD. (GD comes with PHP4). It also uses custom TTF fronts and background images. Changes ------- version 1.3 Text is no longer all in the same orientation, that is each letter will have a slightly different angle, vertical placement and size randomly chosen. -------------------------------------------------------------------------- version 1.2 Added an example using the Captcha class with a Contact form Added more Background Images and Fonts Replaced rand() with mt_rand() This just speeds things up a little ,it's essentially the same function. -------------------------------------------------------------------------- version 1.1 Added a function to create extra "noise" or random dots to the image. ---------------------------------------------------------------------------

  • example1
  • example2
  Files folder image Files  
File Role Description
Plain text file exampleForm.php Example An example usage form
Plain text file ProcessForm.php Example an example of processing the form
Plain text file readme.txt Doc. readmefile
Plain text file SecurityImage.php Class CAPTCHA implementation class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:6,453
This week:261Up