Despamming Shortstat (Part 2)
Further to my earlier (and popular - thanks Shaun) post about Despamming Shortstat, I've made a small update to the code that has a few improvements on the original:
- It now only looks for entries added to the MT-Blacklist database made in the past 72 hours (you can change it if you want). The comment spam blacklist is constantly very similar to those referer spamming, and so only checking recent additions reduces the execution time dramatically and (for me) seems to be just as efficient.
- The script chucks out a brief summary of what spam domains it's removed.
- It also uses a couple of variables from your ShortStat configuration file, so it really should just drop in and play nicely.
- You could probably set this as a cron job now, changing the 72 hours to fit the time of your job.
It's now a few more lines than the original (well, it's not that many, but I was rapidly getting toward a homepage full of scripts) so you can view the code right here instead: