If you run a PHP/MySQL site, forum, CMS, or blog and want to keep hackers and spambots from filling up your content with spammy posts or comments, then this post is for you.
ZB Block is a free script from the famous programmer Zaphod, who has been active on Usenet since the late 1980s.
He didn’t like spam content, so he wrote this great script.
- Download URL: http://www.spambotsecurity.com/zbblock_download.php
How To Install ZbBlock:
Unzip the file, and upload the contents of the ZbBlock folder to the /zbblock folder on your server:
If you want to keep out the Chinese and Korean spammers, you will also be blocking out people from those countries. If you don’t care about that, then also download and unzip the China and North Korea blocks file.
Take the “customsig.inc” file and, in the provided gap, insert the contents of the above file.
It looks like this:
You can add any other country blocks using the above formats, but keep in mind that the smarter spammers use proxies and infected PCs, so nothing is 100% foolproof.
I notice that Asian spammers usually get a web host in the US where they run a proxy server, so I tend to block popular US hosting providers as this approach doesn’t block normal Americans who go directly from their home/work PC to your site.
But it is unfortunate for the few Americans who use legit proxies on their web host accounts.
Run the “setup.php” script and follow the instructions. (Note: After you have run it successfully, you can’t reach it again.)
Essentially, you have to add a special tag at the very beginning of every page you want to protect.
For a WordPress site, you can open up header.php:
Notice that there is no space between the ZBB tag and the start of the doctype. This is very important.
Testing Security of your WordPress Blog
You can fly to China… er, no, there is an easier way…
At the end of your site URL, after the slash, add “?test=xtestx” and you should see a screen like this:
Go ahead, and take the necessary measures to improve your WordPress blog’s security. If you think your blog has been hacked, there are many WordPress plugins to check. Also, try out the WordFence WordPress plugin which will help you further improve the security of your WordPress blog.
This is a guest post by Ash NallaWalla who blogs at ceviews.org. If you would like to write for ShoutMeLoud, check out our submission guidelines.
Like this post? Don’t forget to share it!