January 8, 2008
spam: enough is enough
Even after having updated all five of my blogs’ WordPress installations to version 2.3.2, I was still getting comment spam sent to me, asking me to moderate. While I’m thankful that it was held for moderation, it’s irritating to have to log into WordPress to mark the items as spam (which I’m convinced does nothing at all) and then delete them from my inbox. So I decided to add a few layers of protection to my WordPress installations, two of them being transparent, and one additional layer for proving the end-user to be a real person.
I added two behind-the-scenes layers of protection — Bad Behavior and Akismet — and have to say that they were VERY easy to install. Simply upload the files into your /wp-content/plugins/ folder and then activate them in WordPress. That’s it.
Bad Behavior analyzes the HTTP request information to determine the origin and nature of the request (and process accordingly) whereas Akismet is a web service API that tests comments, trackbacks and pingbacks against their API. Apparently it runs hundreds of tests against the post/request to test for spam. We’ll see how effective these two are.
And because three is not only a holy number, but heck it’s one extra layer of protection [mom always said dress in layers] I added a third layer. I added Pete’s Custom Anti-Spam Image plug-in, which allows me to set up a custom word image that my end-users have to type in, verifying that they are indeed a human being. Customizing the plug-in isn’t terribly difficult; simply do the following:
- Look for the file custom_anti_spam.php in the folder /wp-content/plugins/peters-custom-anti-spam-image/. You can do one of two things: modify in WordPress or edit the file in a text editor and upload the modified file. If you want to modify the file in WordPress, change the permissions on the file to 777, edit the file in WP, then change the permissions to 755 when you’re done.
- The only real edits you need to make to the file (if you want to select the words that people will have to enter to prove their humanity), is changing the word value (between the quotes) around line 34 to 43. Example:
The first line contains: $cas_text[] = “snow”;
I might modify it to: $cas_text[] = “spamhate”;Have fun with your words and make it custom to your site’s content, too. Makes it a bit more fun.
That’s all there really was to it. Now only time will tell how my sites stand up to the onslaught of spambots that plague my blogs on a DAILY basis. I was seriously tired of getting about a half dozen or more comment spams a day and had enough of it. Hopefully this triple protection will do the trick.

January 8, 2008, 10:30 am
Filed under: General, Websites, Wordpress
No Comments

