oliverhentairules

Simple antispammer filtering

Jan 21st, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. I'm sharing it just in case it can come in handy to other people. That is the neatest anti-spammer filter I found to this day. Four lines, no calls for anything else, no problems, no uploading stuff, can be used absolutely anywhere.
  2.  
  3. $xml_string = file_get_contents('http://www.stopforumspam.com/api?ip='.$gduserip);
  4. $xml = new SimpleXMLElement($xml_string);
  5. if($xml->appears == 'yes'){
  6. // or, kinder, if($xml->appears == 'yes' and (substr($xml, -1) > 4)){
  7. // whatever the fuck I want from there. Return 0; die(), file_put_contents to a log.txt. }
Add Comment
Please, Sign In to add comment