...

Check for spammers using stopforumspam.com database

Mayhem30
07-05-2012, 08:48 PM
Check for spammers using stopforumspam.com database.

function checkSpambots($mail,$ip)
{
$spambot = false;

// check the e-mail adress
$xml_string = file_get_contents('http://www.stopforumspam.com/api?email='.$mail);
$xml = new SimpleXMLElement($xml_string);
if($xml->appears == 'yes')
{
$spambot = true;
}
elseif($spambot != true)
{
// e-mail not found in the database, now check the ip
$xml_string = file_get_contents('http://www.stopforumspam.com/api?ip='.$ip);
$xml = new SimpleXMLElement($xml_string);
if($xml->appears == 'yes')
{
$spambot = true;
}
}
}


$spambot = checkSpambots($_POST['email'],$_SERVER['REMOTE_ADDR']);
if($spambot == true)
{
// spambot detected ... do something ...
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum