Captcha stands for “ Completely Automated Public Turing test to tell Computers and Humans Apart”. A captcha is a small program which is used to develop a software program that can create and grade challenges most humans can pass but not by computers. In simple words, it is a program used to determine whether its user is a human or a computer.
Applications where it is useful:
- Free email services.
- Online polls
- Dictionary attacks
- Newsgroups, Blogs, etc...
- Spam
Text based Captcha:
- Gimpy – In this type of captcha, pick a word or words from a small dictionary. Distort them and add noise and background.
- Google's captcha – In this type, pick random letters. Distort them, add noise and backgrounds.
Graphic based Captcha:
- Bongo – In this type, two series of blocks is displayed. User must be able to find the characteristics that sets the two series apart. User is asked to determine which series each of four single blocks belongs to.
/*Simple captcha program */
<?php
$varA=range("0","9");
$varB=range("A","J");
$varC=range("K","Z");
$varD=range("a","j");
$varE=range("k","z");
$varArnd = array_rand($varA);
$varBrnd = array_rand($varB);
$varCrnd = array_rand($varC);
$varDrnd = array_rand($varD);
$varErnd = array_rand($varE);
$prnt="<font color='red'>".$varA[$varArnd]."</font>"."<font color='green'>".$varB[$varBrnd]."</font>".$varC[$varCrnd].$varD[$varDrnd].$varE[$varErnd];
?>
<html>
<head>
</head>
<body style="padding:80px;background-color:#999;">
<table align="center" border="1" >
<tr>
<td colspan="2" align="center" style="padding:10px">
<?php echo "<font size='20'>".$prnt."</font>";?>
</td>
</tr>
</table>
</body>
</html>
0 Comment(s)