Created
September 30, 2013 04:40
-
-
Save slav123/6759446 to your computer and use it in GitHub Desktop.
check email against stopforumsspam DB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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