Updates
Simple Accessible Logical CAPTCHA
Simple , yet powerful logical CAPTCHA, screen-reader accessible.
<?php
//Author Femi Hasani [www.vision.to]
// Simple accessible captcha php
$i=1; //counter
$length = 7;//random string length
$random = "";
$question = array();
$question[1] = "first ";
$question[2] = "second ";
$question[3] = "third ";
$question[4] = "fourth ";
$question[5] = "fifth ";
$question[6] = "sixth ";
$question[7] = "seventh ";
// ... you can add more
$how_many = array();
$how_many[2] = "two letters";
$how_many[3] = "three letters";
while($i <= $length)
{
$random .= chr(mt_rand(65,90));
$i++;
}
$postion = rand(0,$length-3);//random position
$letters = rand(2,3);//random number of letters ...
//echo chunk_split($random,1," ")."<br />";
echo "Result ". $new = substr($random,$postion,$letters)."<br />";
//echo md5($new.date("Y-m-d H")."secretkey")."<br />"; //md5 comparing string with date and hour ...
$postion = $postion+1;
// echo "position ".$postion."<br />";
// echo "letters ".$letters."<br />";
echo "Please enter the ".$question[$postion]." ".$how_many[$letters]." of the following: ".chunk_split($random,1," ")."<br />";
?>
Related Pages
Misc Links, Resources
Upperhost best web hostingHobby Projects
Under development:feedpixel.com - Feeding Your Pixels :-)
Sexy URL!
TAXI CMS Booking System
WebShop, Project Manager, Support System.
Recommended
- Consider Big John Design for your more difficult coding requirements. Accessibility is a given. Fast bug-busting a speciality.CSS Guru.
- DHTMLgoodies
- coder24.com



