Author: Author Lord Raiden
: Searches posts for new users and identifies posts with URL's that may require moderation.
Modification Download: http://www.raiden.net/downloads/spamscout_0.3.0.zip
This little script was originally created as a complimentary tool for the PHPbb Antispam mod for 2.0.x. Since that mod is more or less dead (along with phpbb2) I'm moving it up for use with PHPbb3. Right now I only have the tool as is and designed to work with phpbb2.x that has the AntiSpam mod built by Ramon Fincken installed.
Essentially it's purpose is simple. It shows you all the posts for new users who have less than the minimum required number of posts that contain a URL. Since spam posts typically all have URL's in them pointing to a spam, scam, or attack site, I figured that'd weed out all the other posts and shorten the list of those you needed to pay attention to.
It reads the bbcode in the forum post and converts it to a standard URL, then displays the text of the forum post for you to review. (the bbcode conversion needs a little tweaking, but it works for 98% of url's, but not for pictures oddly enough) From there you can easily spot the URL's, click through if need be, and even review the user details or the post itself and see if it's truly spammy.
The idea here is, if you're using this mod, they've already gotten past your spam filter, and this just goes in and gets the ones who snuck in under the radar and shows them to you. After that, it's just simple human intervention that helps route out these spammers.
The whole script is setup to be very light on your forums, as it quickly filters down who qualifies to be reviewed, and who does not. I thought my forums to be 100% spam free until I ran this script today. Found 65 possible suspect entries, of which 23 were actual spam. Those posts and those users have been removed from my DB and my site is now officially 100% spam free again.
The script needs to be run from the root of your forums, as it has to access the config file in order to login to the db. Also, if you don't have the "mod_spamcheck_userposts" row in your config table, you'll either need to add that for now for testing, or simply replace $min_posts with a value of your choice. I recommend 5 since most spammers won't stick around for more than a post or two before they spam and run. So that should be more than sufficient. In reality you can go as high as you want, but I really don't see a need to since I have yet to see a single spammer who stayed for more than a post or two before leaving.
This script will also require that you review each post, but since they're all listed on the same page, it's quick and easy to spot the URL's and identify which are spammy. It took me more time to actually deal with the offending users (some 20 minutes) than to find all the spam links (about ~1min) So the time you spend with this little tool ever couple of months will ensure that spammers don't use your forums as a link poll to boost their rankings on google. Plus it'll do wonders to prevent you from getting banned by google for being a host to spam links.
If someone wants to jump in and do some more work on this to port it over to PHPbb3 for use until I'm 100% up to speed on PHPbb3, feel free to go right ahead. I posted it here in its current state in order to get a bit of help getting some help bringing it up to speed for full mod use. Hopefully this will be a script you'll only need to use periodically to catch the few spammers that get through your defenses.