PHP Classes

SecurityImage: Generate images for CAPTCHA validation

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   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2008-06-10 (7 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 406 All time: 6,053 This week: 1,134Up
Version License PHP version Categories  
andrewsecurityimage 1.3GNU General Publi...4.0Graphics, Validation, Security
Description Author  

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 United Kingdom
Age: ???
All time rank: 18011 in United Kingdom United Kingdom
Week rank: 140 Up7 in United Kingdom United Kingdom Up
Innovation award
Innovation award
Nominee: 1x

Security Images  (captcha)

Author:		A.D.Surrey
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.


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.

  • example2
  • example1
  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  
 0%Total:406All time:6,053
 This week:0This week:1,134Up