Anti-spam protection for blog comments

As a sure sign that at least spambots have taken a liking to one's blog is the appearance of spam comments! It wasn't that bad -- when I walked in to the office this morning there were notifications for 5 spam comments. But the annoying, automated spam "efforts" will be curbed immediately on this site with the installation of a CAPTCHA extension.

CAPTCHA is an acronym for "Completely Automated Public Turing test to tell Computers and Humans Apart" and consists of an image of random letters or words. Prospective commenters have to fill in a field in the comment form, typing out the letters that appear in the image. If what is typed matches what is shown in the image, the comment is allowed through. In theory at least, humans should be able to read the letters in the image and computers shouldn't. However, on the human side, this depends on having an image that is clear enough to read (and the human must not be blind -- more on that later). On the robot side, spambot engineers have been able to craft intelligent robots, capable of deciphering the letters in the images. And some really really evil spambots will take the image, display it on another site (like a porn site) for a real person to type it into a registration form, then feed what the person typed back into the original form that it is trying to spam. But smart robots aren't everywhere yet and they don't always work. Therefore, CAPTCHA is an imperfect but effective solution for now.

CAPTCHA has drawn the criticism of web accessibility proponents (and rightfully so). Visually impaired readers cannot see the images, of course, and screen readers can only read the "alt" tag of the image. One way to address this is to have a link to an audio file that reads out the letters of the anti-spam word.

CAPTCHA is not the only anti-spam solution, with sophisticated filters, JavaScript tests (since robots often don't have JavaScript enabled), hidden by CSS fields (since robots often don't read CSS, and thus you can identify spambots by who filled in a hidden CSS field) and other scripts also available. They all have their pros and cons, and, since I find this endless battle between humans and spambots fascinating, I would love to read your thoughts on the subject! I invite you to... *ahem*... add a comment!

Try out our CAPTCHA solution below or download it in the contributions section on ez.no.

Comments

Trying your Captcha

that's pretty cool, works like a charm, and I didn't even lose my comment when I put the wrong text for captcha.
Awesome job, Peter! Very nice and user friendly way to fight spam.

Have you heard about recaptcha?

Its a nice idea http://recaptcha.net/

Also if you have the chance take a look at this fun video

http://video.google.com/videoplay?docid=-8246463980976635143&q=human+computing&total=327&start=0&num=10&so=0&type=search&plindex=0

See you

Akismet too

Thanks for the links, Sebastian.

reCAPTCHA is a very good project but is slightly more complicated for the user and obscures the words.

That video kept me interested for the full 50 minutes and is definitely worth checking out for those interested in innovative ways of using human computational power. We can work to improve the world while having fun!

There's also an Akismet extension available for eZ Publish:

http://projects.ez.no/akismet

reCAPTCHA for eZ Publish

Out of interest I've created a reCAPTCHA module for eZ publish. See:
http://ez.no/developer/contribs/applications/recaptcha
http://suffandnonsense.blogspot.com/2008/01/recaptcha-for-ez-publish.html

Cheers
Bruce

Thanks, Bruce

Thanks for your contribution, Bruce. I see that you've created versions for eZ Publish 3 and 4!

Comments are closed
eZ publish™ copyright © 1999-2010 eZ systems as