MT-Blacklist Updater

Version 0.3 fixes a problem with additions and deletions of blacklist entries. Ed Morris, who reported and fixed the bug, would be the better person to explain the problem:

I realised that if a site were deleted and then re-added to the blacklist in the same changes file, the site would never get re-added locally (well it would briefly), as all deletions are carried out after additions in the script.

Thanks Ed!

To update your existing installation, just overwrite your existing updateblacklist.php with the one in the 0.3 package (remember you have to copy over your settings first!)

MT-Blacklist Updater is a simple PHP script that keeps your MT-Blacklist setup updated with the latest blacklist via the blacklist changes RSS feed. Works with it's namesake, MT-Blacklist.

MT-Blacklist Updater emulates Gene Wood's similar updater. The differentiating aspect is the use of the blacklist changes RSS feed instead of wholesale importing of the latest master blacklist. This allows deletion of the entries that have been removed from the master blacklist.

Download

Latest version: 0.3

Version 0.2

Version 0.1

Requirements

Your webserver must support PHP and cron (or similar scheduling functionality). A simmering hate for spam is preferred, but not required.

Installation instructions

  1. Unarchive the package you downloaded. It will unarchive into it's own blacklistupdater/ directory.
  2. Open updateblacklist.php in a text editor. Look for this line at the top:
      define( 'SCRIPT_PATH', '/path/to/blacklistupdater/' );
    Replace '/path/to/blacklistupdater/' with the full path to where updateblacklist.php is found on your web server.
  3. Look for these lines near the top:
      $mt_username = 'YOUR_USERNAME';
      $mt_password = 'YOUR_PASSWORD';
    Replace 'YOUR_USERNAME' with your Movable Type username and 'YOUR_PASSWORD' with the corresponding password. You can also create a new Movable Type user for your blog without any posting rights for added security as mentioned here.
  4. Next, look for this line:
      $mt_blacklist_url = 'http://yourdomain.com/path/to/mt-blacklist.cgi';
    Change this to point to the URL to your mt-blacklist.cgi file. Save your changes.
  5. Upload everything to your web server. To keep it simple, you should just upload the blacklistupdater/ directory.
    Note: this doesn't have to be placed under your webroot - place it wherever you like. However, if you want to be able to run the script as you like it (instead of depending on cron), you have to place it under your webroot and just access http://yourdomain.com/blacklistupdater/updateblacklist.php via a web browser.
  6. You have to set up a cron job like
      0 */2 * * * /path/to/php /path/to/updateblacklist.php
    which will update every 2 hours. cPanel and other hosting control panels often provide a cron job section which makes it easy to setup cron jobs. You can also Google for cron job tutorials.
  7. Update your MT-Blacklist with the latest master blacklist. Aaaaand you're done! Sit back and let it work (yes, this time it works!)

Chris had this to add about putting your Movable Type username and password into the updateblacklist.php script:

One thing that you may be interested in is that I could add another blog user without any posting rights to my blog and the updater is happy with that by the looks of it.

Similar scripts written by other people

Support

If you find a bug, have a comment, or have a suggestion, do leave me a message via this contact form. Thanks!

Credits

Credit goes to:

Related Links

Copyright

Copyright(c) 2003-2008 Cheah Chu Yeow. All rights reserved.
This software is released under the GNU General Public License.
Please read the disclaimers in magpierss/README and at the top of the Snoopy.class.inc file in the download package.