appears == 'yes') bb_die('Your email address has been marked as spam by StopForumSpam.com. Contact the forum administrator if you are not a spambot.'); else return $r; } else return $r; } else return $r; } function nospamuser_check_username($username) { if ($username) { if (!class_exists('SimpleXMLElement')) return $username; $response = new SimpleXMLElement(file_get_contents('http://www.stopforumspam.com/api?username='.urlencode($username))); if ($response['success']) { if ($response->appears == 'yes') bb_die('Your username has been marked as spam by StopForumSpam.com. Contact the forum administrator if you are not a spambot.'); else return $username; } else return $username; } else return $username; } function nospamuser_check_ip() { if (!class_exists('SimpleXMLElement')) return; $response = new SimpleXMLElement(file_get_contents('http://www.stopforumspam.com/api?ip='.urlencode($_SERVER['REMOTE_ADDR']))); if ($response['success']) { if ($response->appears == 'yes') bb_die('Your IP address has been marked as spam by StopForumSpam.com. Contact the forum administrator if you are not a spambot.'); } } add_filter('bb_verify_email', 'nospamuser_check_email', 10, 2); add_filter('sanitize_user', 'nospamuser_check_username'); if (bb_get_location() == 'register-page') nospamuser_check_ip(); } ?>