PHP Classes
elePHPant
Icontem

Object CAPTCHA: Perform CAPTCHA validation using object images

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (10)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2010-03-09 (6 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 315 All time: 6,879 This week: 1,043Up
Version License PHP version Categories
object-captcha 1.0BSD License5PHP 5, Graphics, Validation
Description Author

This class can be used to perform CAPTCHA validation using object images.

It can scan a given directory with object images in JPEG format and pick one randomly to display to the user.

The user must enter the object name that is taken from the object image file name and stored in a MySQL database for posterior validation.

Picture of wooptoo
Name: wooptoo <contact>
Classes: 2 packages by
Country: Romania Romania

Details


README
------

We must connect to a db for this to work
========================================
1. create a database
2. import objectcaptcha.sql in it
3. set your credentials in db.php


ObjectCaptcha works in two steps
================================
* First (in index.php) an image is grabbed, the answer saved to the db,
then the registration form displayed.
* Second (in register.php) the answer from the db is compared to the input from
the form.


Some notes on ObjectCaptcha
===========================
* A random jpg image will be displayed each time (and its answer saved to the db).
* The answer to an image is the image's filename.
* Multiple answers can be given for an image.
They have to be separated with underscores in the image's filename.
For example, for: boot_shoe.jpg the answer can be either 'boot' or 'shoe'
* ObjectCaptcha needs a db to temporarily store answers, because it would be
unsafe to store them in cookies.
* Images are encoded in base64 format and displayed like that, so their original
filename cannot be retrieved.
* Random garbage is added to the end of an image (JPEG allows this)
to protect against hash attacks on the image.
* I originally created ObjectCaptcha as a mod for SMF forum.
This is a more generic relase that can be used with other systems.


Files
=====
These are example files, not needed on a production site:

db.php
index.php
register.php
readme.txt
screenshot.png

objectcaptcha.sql is needed only for installation.

Any .jpg file placed in the directory will be used by the Captcha.
Screenshots  
  • screenshot.png
  Files folder image Files  
File Role Description
Image file bird.jpg Data image1
Image file book.jpg Data image2
Image file boot_shoe.jpg Data image3
Image file box.jpg Data image4
Plain text file class.objectcaptcha.php Class ObjectCaptcha class
Plain text file db.php Example db config
Plain text file index.php Example example main page
Plain text file objectcaptcha.sql Data db schema
Plain text file readme.txt Doc. readme
Plain text file register.php Example example second page

 Version Control Unique User Downloads Download Rankings  
 0%
Total:315
This week:0
All time:6,879
This week:1,043Up