PHP Classes
elePHPant
Icontem

Image CAPTCHA: CAPTCHA validation using a fixed list of images

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   Screenshots Screenshots   View files View files (17)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2009-08-26 (5 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 845 All time: 3,857 This week: 1,052Up
Version License PHP version Categories  
image_captcha 1.0GNU Lesser Genera...5.0PHP 5, Graphics, Audio, Validation, S...
Description Author  

This class implements CAPTCHA validation using a fixed list of images.

It retrieves images from a server side directory and displays obfuscated versions to the user along with radio buttons to let the user pick the one that corresponds to the right answer.

The class may also generate automatic thumbnails for each of the images.

It may also play alternative audio samples for visually impaired users.

Picture of mithereal
Name: mithereal <contact>
Classes: 1 package by
Country: United States United States
Age: ???
All time rank: 2384296 in United States United States
Week rank: 1577 Up175 in United States United States Up

Details provided by the author  
/*
 *  Project: image_captcha A php class for creating captcha images using pictures instead of hard to read text
 *  File: image_captcha.php
 *  Copyright 2009 Jason Clark <mithereal@yahoo.com>
 *  version 1.00 - 08/02/09
 *  
 */
 
This is image_captcha
Why this was created: I was unsatisfied with the garbled and hard to read texts of common captchas available, most of the time I either fat fingered the code, missed a space or the galaxy would spew chunks of err. "incorect code".
so my answer image_captcha

This will pull the images out of a user defined dir and obfuscate them before rendering them to the screen
then it will allow the user to select the correct image via a select box or a radio button.
This also allows the admin to choose the number of random words or filenames that will appear in the select box or radio field.
Thumbnail support is available, in which missing thumbs are automatically generated from larger images and then displayed.
Audio support is also provided for the visually impared.
typical file structure is as follows
[images] -> images to display
[images/thumbnails] -> thumbnails of images
[words/wordlist.txt] -> the wordlist 
[audio] -> the names of the audio files, they must match imagenames (without file extension) and have the file extension '.wav'.

Donations are much appreciated
and go to the unemployment/food to mouth fund!! 
paypal: mithereal@yahoo.com

Usage:
Place your images in the images dir.
Underscores will be changed to spaces in the selection field.
thumbnails support provided/depend via phpThumb, you can download it freely from http://phpthumb.sourceforge.net, place in phpThumb dir.
to configure edit image_captcha.php.
thumbnails are turned off by default.
If you have thumbnails turned on they will be created.
Thumbs are created only once. 
If you change the thumbnail size later, you will want to delete everything in the thumbnails directory for the size change to take effect.

This code was inspired by Drew Phillips
<drew@drew-phillips.com> 
creator of securimage


Screenshots  
  • image_captcha.jpg
  • images/Four.gif
  Files folder image Files  
File Role Description
Files folder imageaudio (1 file)
Files folder imageicons (1 file)
Files folder imageimages (6 files, 1 directory)
Files folder imagephpThumb (1 file)
Files folder imagewords (1 file)
Plain text file image_captcha.php Class image captcha class
Accessible without login Plain text file image_play.php Example image captcha helper
Accessible without login Plain text file image_show.php Example image captcha helper
Accessible without login Plain text file index.php Example image captcha example
Accessible without login Plain text file LICENSE.txt Lic. LICENSE
Accessible without login Plain text file README.txt Doc. Readme

  Files folder image Files  /  audio  
File Role Description
  Accessible without login Plain text file audio.txt Data placeholder

  Files folder image Files  /  icons  
File Role Description
  Accessible without login Image file audio_icon.gif Icon audio icon

  Files folder image Files  /  images  
File Role Description
Files folder imagethumbs (1 file)
  Accessible without login Image file cat.gif Icon sample image
  Accessible without login Image file dog.gif Icon sample image
  Accessible without login Image file motorcycle.jpg Icon sample image
  Accessible without login Image file one.gif Icon sample image
  Accessible without login Image file Three.gif Icon sample image
  Accessible without login Image file Two.gif Icon sample image

  Files folder image Files  /  images  /  thumbs  
File Role Description
  Accessible without login Plain text file placeholder.txt Data thumbnail dir

  Files folder image Files  /  phpThumb  
File Role Description
  Accessible without login Plain text file phpthumb.txt Data phpthumb.txt

  Files folder image Files  /  words  
File Role Description
  Accessible without login Plain text file words.txt Data wordslist file

 Version Control Unique User Downloads Download Rankings  
 0%Total:845All time:3,857
 This week:0This week:1,052Up