HTML Code:
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$ipArray = preg_replace("#\r\n?|\n#","",file('IP.dat')); // read the file into an array and remove new line breaks (should cover all OS)
foreach ($ipArray as $ipTest) {
if (substr_count($ip, $ipTest) != "0") {
header('location: /banned.htm'); // the banned display page
die();
}
}
?>






