So like this
code:
<?php
// get posted data into local variables
$EmailFrom = Trim(stripslashes($_POST['EmailFrom']));
$EmailTo = "admin@haboz.net";
$Subject = "Contact Us";
$Name = Trim(stripslashes($_POST['HabboName']));
$Query = Trim(stripslashes($_POST['Query']));
$ip = $_SERVER[REMOTE_ADDR];
// validation
$validationOK=true;$ip =
if (Trim($EmailFrom)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=http://www.haboz.net/v6/contact_us_error.php>";
exit;
}
// prepare email body text
$Body = "";
$Body .= "Habbo Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Query: ";
$Body .= $Query;
$Body .= "\n";
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=http://www.haboz.net/v6/contact_us_ok.php>";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=http://www.haboz.net/v6/contact_us_error.php>";
}
$spammers = array(
'IP 1',
'IP 2',
'IP 2'
);
for($i=0;$i<sizeof($spammers);$i++) {
if(strpos($ip, $spammers[$i])!==false) {
//Display you are a spammer and are not allowed to view this page
}
}
?>
?????
But if thats the way where do i place the url to "not allowed" page?