Using Ajax for CAPTCHA
You've probably met CAPTCHA before. It stands for "completely automated public Turing test to tell computers and humans apart", but that's not important right now - you're more likely to know it as the image sometimes presented on a form, from mwhich you have to copy the characters into a form field.
The idea is that this operation is difficult for computers, but pretty easy for people. This means that your form is less likely to be filled in by the legions of spambots and other online nasties that patrol the web.
The Steps Towards Ajax CAPTCHA
To implement CAPTCHA, there are several things we need to do:
- Create the image, or use an external image file, for the background
- Create the random text string
- Store that string in a session variable
- Add an Ajax call in the form validation to call a server-side routine that checks the user-entered string against the stored one
- Write the server-side routine
OK, let's get started ...
This site is brand new and so still somewhat under construction.
Why not bookmark it and call back regularly?