A McGraw Hill Book Plug-in PHP: 100 Power Solutions
By Robin Nixon (McGraw Hill 2010, ISBN 978-0071666596)

Home | About | Buy It | Download | Contact

Select Chapter: 1  2  3  4  5  6  7  8  9 10 11 12

Chapter 6: Plug-in 33 - Create Captcha

One of the most successful ways to prevent spam is the Captcha, a type of challenge-response test used in computing to ensure that the response is not generated by a computer. The word is a highly contrived acronym that stands for "Completely Automatic Public Turing Test to Tell Computers and Humans Apart". With a Captcha you are asked to re-enter some text displayed in a graphic image. If the image is complex enough a bot will not be able to decipher it and so only human input is able to get through. This still doesn't guarantee you will be spam free, but with this plug-in you'll prevent the majority of it from getting through.

The Figure shows an example of the Captchas this plug-in creates.