Skip to content

Instantly share code, notes, and snippets.

@slav123
Created September 30, 2013 04:40
Show Gist options
  • Save slav123/6759446 to your computer and use it in GitHub Desktop.
Save slav123/6759446 to your computer and use it in GitHub Desktop.
check email against stopforumsspam DB
<?php
$spam = file_get_contents('http://www.stopforumspam.com/api?' . http_build_query(array('email' => pun_trim($_POST['req_email1']), 'f' => 'json')));
$json = json_decode($spam);
if ($json->email->appears == 1) {
header("HTTP/1.1 403 Unauthorized", 403);
die("We don't like spammers. Clean up your name at http://www.stopforumspam.com/ ");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment