CAPTCHA
Every day we learn something new. I publish an insignificant little non-profit website about a local folly called Alfred’s Tower. You can view the site at www.AlfredsTower.info. It has an ASP.NET feedback form where visitors can submit comments. The comments are sent by email to me and the sender receives an acknowledgement email thanking them for taking the trouble to make a contribution.
Recently the feedback form has been ‘found’ by spammers who are now using it to send several emails a day containing the URLs of their websites. I have amended my code so that the sender doesn’t receive an email acknowledgement when a URL is included in the text, but the spam keeps coming, presumably sent by some automated process. This is when I turned my attention to CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart). This is a challenge to the user of a web form that attempts to determine whether the form is being used by a human or by an automated process. The test usually takes the form of an image that displays jumbled, overlapping, or distorted letters and numbers, and the user is asked to copy the characters into a textbox. If the user correctly transposes the characters they are assumed to be human because computer programs are not good at this kind of test.
I decided to add such a test to my ASP.NET 2.0 web form. A quick Google found a few paid-for controls that appeared to meet my needs, but since the website is not commercial I didn’t want to spend $50 or $100 that I wouldn’t be able to recoup. After a little more hunting I found exactly what I was looking for; a free, public domain offering from Peter Bromberg that doesn’t generate images, it actually forms the text characters in HTML at runtime (see eggheadcafe.com). This is arguably a better method than displaying a distorted image because the generated text is easy to read by everyone who isn’t visually impaired, whereas some of the more sophisticated CAPTCHA controls are hard to use because the distorted text is difficult to interpret even by intelligent humans. The picture above shows an example of the random text generated Peter Bromberg’s code.
Since introducing this method no spam messages have been received from this form.