Main Content

Preventing forum spam - checks at sign up

Archive - Originally posted on "The Horse's Mouth" - 2009-05-12 07:10:10 - Graham Ellis

You may have seen the IP lookup tool we have on our front page (if not, bookmark http://www.wellho.net and it's the bottom right link) which I use extensively to find out a little bit more about addresses that catch my interest - be they generating unusual traffic on our web site, scouring are pages in a "very interested" way, or signing up for a forum.

I told you about projecthoneypot and stopforumspam recently (here) and I have just added the following code to my front page tool which incorporates the summary of a stopforumspam report (they provide a nice api) within the tool.


$spammer = file_get_contents("http://www.stopforumspam.com/api?ip=$fip");
if (ereg("<appears>yes<appears>",$spammer)) {
ereg("<frequency>([[:digit:]]+)<frequency>",$spammer,$rs);
$spamreport = "$rs[1] report".(($rs[1]>0)?"s - ":" - ");
$spamreport .= "<a href=http://www.stopforumspam.com/".
"ipcheck/$fip target=exfull>more<a>";
} else {
$spamreport = "Clear";
}


(the incoming IP address for this code should be in the $fip variable, and should have been checked for format / cleaned up by the time you use the code snippet above!)

Try it here:
Ask about ip: 


I have not found an automated API on projecthoneypot ... but a URL of the form http://www.projecthoneypot.org/ip_194.8.75.145 gives a result which includes the string "We don't have data on this IP currently" if the IP looks clear to them.