Okie, got it sorted for punBB aswell.
Open: /register.php
Find (approx line #121:
Code:
if ($forum_db->num_rows($result))
$errors[] = $lang_profile['Registration flood'];
Add
AFTER:
Code:
/// BEGIN SPAM MOD
$username = $_POST['req_username'];
$email = $_POST['req_email1'];
$ip = get_remote_address();
$fspamcheck = file_get_contents('http://temerc.com/Check_Spammers/check_spammers_plain.php?name='.$username.'&email='.$email.'&ip='.$ip);
if (strpos($fspamcheck, 'TRUE') !==False) {
// Notify admin via e-mail
$blockedby = str_replace(' TRUE', '', $fspamcheck);
$blockedby = str_replace(' ', ' & ', $blockedby);
$msg = 'The following was blocked by the '.$blockedby.' filter<br><br>Username: '.$username.'<br><br>Email: '.$email.'<br><br>IP: '.$ip;
// Change your@email.addr to the e-mail address you want e-mail reports sent to
$to = "your@email.addr";
$from = "nobody@".$_SERVER['SERVER_NAME'];
$subject = "Spammer blocked by hpHosts Spam filter";
$headers = "MIME-Versin: 1.0\r\n" .
"Content-type: text/html; charset=ISO-8859-1; format=flowed\r\n" .
"Content-Transfer-Encoding: 8bit\r\n" .
"From: " . $from . "\r\n" .
"X-Mailer: hpHosts Spam Filter";
mail($to, $subject, $msg, $headers);
// Notify user
die("Registration blocked by spam filter. Please contact the forum administrator.");
exit;
}
/// END SPAM MOD
If you are hosting the
check_spammers function locally, then change;
h
ttp://temerc.com/Check_Spammers/check_spammers_plain.php
to;
h
ttp://YOUR_DOMAIN/PATH_TO_CHECK_SPAMMERS/check_spammers_plain.php