Recent projects have come into contact with a new PHP captcha tool-securimage, which is very simple and convenient to use, and supports Ajax calls, so here's a recommendation for you.
What is Securimage?
Securimage is an open source/free Phpcaptcha script that can be used to generate complex CAPTCHA images to help your site prevent spam. It can be easily embedded in the existing forms of the site, providing your site with the protection of spam robots. It can run on most webserver that support PHP (GD).
* Click here to view the Quick guide
*securimage instances
* Download the latest version
Features of the Securimage:
* Display verification code in only three lines of code
* Validate code input with only six lines of code
* Custom Verification code length
* Custom Character Set
* Support TTF
* Use a custom GD font (if TTF is not supported)
* Easily add a custom background image
* Rich text support, including color/angle/Transparency options
* Text confusions arched lines through text
* Generate CAPTCHA audio files in WAV format
* Custom CAPTCHA Verification Code list
Let's give you a simple example:
Securimage Test Form
if (empty ($_post)) {?>
} Else{//form is posted
Include ("securimage.php");
$img =new securimage ();
$valid = $img->check ($_post[code]);//Check that the user's input is correct
if ($valid ==true) {
echo "
Thanks, you entered the correct code. ";
} else{
echo " Sorry, the code you entered is invalid. Go back to try again. ";
}
}
?>
Securimage_show.php's Code:
Include securimage.php;//the core class library code inside the download package
$img =new securimage ();
$img->show ();//alternate use: $img->show (/path/to/background.jpg);
?>
http://www.bkjia.com/PHPjc/486571.html www.bkjia.com true http://www.bkjia.com/PHPjc/486571.html techarticle recent projects have come into contact with a new PHP captcha tool-securimage, which is very simple and convenient to use, and supports Ajax calls, so here's a recommendation for you. What is ...