Login   Register  
PHP Classes
elePHPant
Icontem

Math Guard: CAPTCHA validation using math expressions

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 (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2007-06-03 (7 years ago) RSS 2.0 feedStarStarStarStar 76%Total: 2,125 This week: 3All time: 1,731 This week: 572Up
Version License PHP version Categories  
mathguard 0.2GNU General Public Lice...3.0HTML, Validation, Security
Description Author  

This class can be used to perform CAPTCHA validation presenting simple mathematical expressions to the users to make it difficult for robots to pass a form being validated.

It displays a mathematical expression of a sum between two random numbers and asks the user to enter the result in a text form input.

The class generates an hash of the result using a secret prime number that is passed in an hidden form input.

When the user enters the result, the class validates it comparing the hash of the value entered by the user with the hash passed in the hidden input.

Innovation Award  
PHP Programming Innovation award nominee
June 2007
Number 7


Prize: One book of choice by Packt
CAPTCHA validation is being used everywhere on the Internet to make it difficult for robots to access sites that should be accessed only by real human user beings.

One of the problems is that most solutions are based on images. Obviously, such images cannot be read by blind users using regular text to speech conversion programs.

This class provides a CAPTCHA alternative that is not based on images, but rather on simple math operations.

This way, blind users can read what is written in the pages and pass the CAPTCHA validation tests giving the correct results to requested operations.

Manuel Lemos
Picture of m
Name: m <contact>
Classes: 1 package by
Country: Slovak Republic Slovak Republic
Age: ???
All time rank: 12975 in Slovak Republic Slovak Republic
Week rank: 569 Up3 in Slovak Republic Slovak Republic Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file ClassMathGuard.php Class Main MathGuard class
Accessible without login Plain text file formhandler.php Example The php script which handles the verification and action
Accessible without login Plain text file index.php Example Main sample Form that has to be protected
Accessible without login HTML file readme.html Doc. Simple readme file with the example description

 Version Control Unique User Downloads Download Rankings  
 0%Total:2,125All time:1,731
 This week:3This week:572Up
 User Ratings  
 
 All time
Utility:100%StarStarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:91%StarStarStarStarStar
Examples:100%StarStarStarStarStarStar
Tests:-
Videos:-
Overall:76%StarStarStarStar
Rank:41