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.
jens says
It seems that Bad Behavior will stop my SPAM-ING Problems for my comment script. I think I am gonne try it out. Thanks for the advice..
Greets Jens ( http://www.isoliert.de/forums/ )