Stopping the spammers in their tracks

Comment spam can be a pain.
Email spam renders email unusable.
Being able to block both easily would be the “Holy Grail” for many bloggers.



Michael Hampton (io_error)
has developed a set of scripts to do just that.
His bad behaviour suite of scripts is described as:

… a set of PHP scripts which prevents spambots from accessing your site by analyzing their actual HTTP requests and comparing them to profiles from known spambots.

Not only will it stop comment spammers, but it will also stop referrer spam and email scrapers.
Although he may have originally developed the scripts for use in conjunction with WordPress, he has also developed versions that are compatible with other blogging platforms and claims that the scripts can be used in conjunction with any number of dynamic sites (eg. CMS):

Bad Behavior is available for several PHP-based software packages, and also can be integrated in seconds into any PHP script.

When a badly behaved UserAgent attempts to access your site it will get an error.
I grabbed a copy of it last night for WordPress and so far it has stopped a dozen comment spammers from accessing this blog. Whether or not it will remain effective over time is something that I will have to wait and see.
The only downside to the scripts is that there is no frontend to the logs, so you have to use phpmyadmin or equivalent to view them.
Further information, download and install instructions are available on his site.

By Michele Neylon

Michele is founder and CEO of Irish hosting provider and domain name registrar Blacknight.

One comment

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version