Login   Register  
PHP Classes
elePHPant
Icontem

VeriWord: A PHP CAPTCHA System

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (20)   DownloadInstall with Composer Download .zip   Reputation   Support forum (5)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2004-10-31 (10 years ago) RSS 2.0 feedStarStarStarStar 71%Total: 8,687 All time: 170 This week: 1,547Down
Version License Categories  
veriword 1.0.0FreewareGraphics, Validation, Security, Flash
Description Author  

Veriword is a PHP Captcha system thats generate a question in form of an image with random baffle text or in another form such as an animated flash. The class is capable of picking a random word, generate captcha and store the word in an encrypted session variable for posterior validation eventually in a form on which it is used to prevent robots to have automated access.

Current features of VeriWord are:

A. Generation and rendering of Captcha images (as JPEG/PNG/GIF/WBMP) or flash (as SWF) at runtime for inclusion in an existing entry form. VeriWord use captcha engine (see class.captcha.php) which uses three other classes to compose captcha. These classes are:

1. WordGenerator (class.wordgenerator.php) generates random word from dictionary file or create spelled random word. Three type of random word are:
> DictionaryWord, pick a random word from dictionary.
> SemiDictionaryWord, pick a random word from dictionary then plus with random suffix.
> RandomWord, pick a nonsence word by composing consonants and vowels, so the word can be spelled by human.

2. WordArt (class.wordart.php) creates distorted word with random TrueType fonts from font directory. This class calls Filter to create baffle text of the word. Check existing filter on class.filter.php, you may add your filter to make your captcha is unique than others. Two type of WordArt are:
> Linear, write a word in linear manner.
> NonLinear, write a word in various size, angle, vertical position for each characters.

Some existing filters are:
> Wavy, distort a word image by waving object using sin or cos functions.
> Bubbly, disturb a word image by filling object with tens of bubbles.
> BreakType, distort a word image by reducing pixels.

3. NoiseGenerator (class.noisegenerator.php) picks a random background from noise directory or create one on the fly. These types are:
> BackgroundNoise, pick a noise image from noises directory. The image format can be JPEG or GIF with dimension about 100 x 50 pixles.
> RandomNoise, create a noise image on the fly by drawing lines in a range of angles. You may add or change the way of noise creation, for example grid background or gradient color background.

o Expecially for FlashCaptcha (class.flashcaptcha.php), this flash is created using Ming module (make sure you use the latest version), the captchaing is done by disturbing the word with animated bars and bubbles, the human still able to read the word but robot can't.

B. Configuration made in veriword.ini file that parsed by ConfigReader (class.configreader.php), this parsing done in VeriWord creation.

C. Store random word in md5 encrypted session variable.

D. Verify the posted word using VeriFicator class. At the present, this class only has one job, that is verifying the word. Next time, I want to add the capability by extending more functionalities, such as monitoring, tracking or banding.

Picture of Huda M Elmatsani
Name: Huda M Elmatsani <contact>
Classes: 14 packages by
Country: Indonesia Indonesia
Age: ???
All time rank: 151 in Indonesia Indonesia
Week rank: 89 Down1 in Indonesia Indonesia Equal
Innovation award
Innovation award
Nominee: 5x

Winner: 3x

  Files folder image Files  
File Role Description
Plain text file class.captcha.php Class class generates captcha
Plain text file class.configreader.php Class class reads config file
Plain text file class.filefinder.php Class class handles file
Plain text file class.filter.php Class class produces effect to wordart
Plain text file class.flashcaptcha.php Class class generates FlashCaptcha
Plain text file class.img2bitmap.php Class class coverts image to bitmap
Plain text file class.noisegenerator.php Class class generates noisy background
Plain text file class.verificator.php Class class verifies posted veriword
Plain text file class.veriword.php Class class implements captcha
Plain text file class.wordart.php Class class produces wordart
Plain text file class.wordgenerator.php Class class generates random word
Accessible without login Plain text file flash.sample.php Example example using FlashCaptcha
Accessible without login Plain text file flash.veriword.php Appl. flash output
Accessible without login Plain text file image.veriword.php Appl. image output
Accessible without login Plain text file sample.php Example veriword implementation
Accessible without login Plain text file test.captcha.php Example test captcha class
Accessible without login Plain text file test.wordart.php Example test wordart class
Accessible without login HTML file VeriWord.htm Doc. simple notes
Accessible without login Plain text file veriword.ini Conf. configuration setting
Accessible without login Plain text file words.txt Data sample of word stock

 Version Control Unique User Downloads Download Rankings  
 0%Total:8,687All time:170
 This week:0This week:1,547Down
 User Ratings  
 
 All time
Utility:92%StarStarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:82%StarStarStarStarStar
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:71%StarStarStarStar
Rank:155