SpotBot was created for the purpose of controlling spam before it clutters up your server. Gone are the days of constant comments about Gucci bags in broken English. SpotBot not only stops spam from comments, but also stops bots from creating fake accounts or even logging in, but the fun doesn’t stop there! A custom action has been built in so you can add it into any template to stop access to that page!
So how does it work?
Every task that starts or ends in WordPress starts with an action! SpotBot utilizes these actions, to gain control over who has access to your site! But how can it tell who’s bad and who’s good? SpotBot uses a service from BotScout to determine who the baddies are. They have allowed public access to their database through an API that SpotBot utilizes. This API access is limited though, and only allows around 300 queries to it in any 24-hour period. You could pay BotScout for more access as they’re fairly cheap, but to help them keep their costs down and help you have control over your visitors, all IP’s are logged to your database. Each time a returning IP is found, it checks the cache first and if nothing is found checks BotScout for more information. It’s as simple as that, SpotBot can be a set-it-and-forget-it plugin, but it can be more than that. Have a problem with a particular user that keeps making user accounts? Flag them as a bot! The harder they try, the more flags they generate and the higher they go on the bot score! SpotBot comes with a built in search function to make finding those troublesome bots easier than ever. Don’t want to save the IP in a list of trouble makers? Make a note of them in each IPs note section for easy searching. Can only remember the first 3 digits of the IP address? Search for it!
- Download the spotbot zip from the wordpress plugins directory
- Extract the `spotbot` directory from the zip
- Upload the `spotbot` directory to the `/wp-content/plugins/` directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Apply for a BotScout API key from here http://botscout.com/getkey.htm
- After you have recieved your key, go to the ‘Settings’ submenu in SpotBot
- Paste the key you recieved from BotScout in the API Key textbox and click ‘Check it!’
- If ‘Check it!’ turns into a green ‘OK!’, save via the button at the bottom.
- If ‘Check it!’ turns into a red ‘INVALID!’ verify that your key is correct. If it IS correct try again later.
- Set your custom Warning HTML message when ‘bots‘ view the comment or login forms. This message can be composed of any HTML formatting.
How to use the custom action!
SpotBot uses actions within WordPress to basically do what it does. There is also a custom action built in that will allow you to block access to the entire website if you see fit. Although I don’t recommend blocking your entire site, it’s ultimately your choice on how to use this feature.
While creating your custom template, post the following code within the php file:
It must be inserted sometime after your header has been called, as none of the scripts required have been loaded before then.
What’s an API key, and why you need one!
An API key will allow you access to the BotScout API. Each time a user applies for an API key, an accout is generated with BotScout and is used to monitor traffic and query counts. By default BotScout only allows 300 queries to be run per day from a user. You can “buy” more if you wish by donating to the BotScout cause. However signing up is free and easy. Here’s how easy it is:
Fill out the information here. It may take up to 24 hours for you to get your API key, but it usually is a matter of minutes. Be sure to check your spam filter, as sometimes email providers block keywords such as bot.
Once you get your email there will be an multi-case alphanumeric code. It should be around 15 characters long. Select and copy your key, then paste it in the API Key area in SpotBot settings.
To validate your key, click on “Check it!”. If it says OK!, then your key is valid and working(Don’t forget to hit the Save Options button at the bottom!)
However, if your check comes back as INVALID!, there is either something wrong with your key or BotScout has not updated access for you yet. Wait an hour, and try again. If problems persist, contact BotScout for more details.
Contributors & Developers
“SpotBot” is open source software. The following people have contributed to this plugin.
- Initial release
- fixed IP cleanup
- all IP’s set to be cleaned from DB will only be removed if the notes section is empty
- added debug mode for easier development
- tested and working for WP 3.7.1