Php de ip adresi engelleme
$ip = $_SERVER[‘REMOTE_ADDR’];
$ipArray = preg_replace(“#\r\n?|\n#”,””,file(‘IP.txt’));
foreach ($ipArray as $ipTest) {
if (substr_count($ip, $ipTest) != “0”) {
header(‘location: http://google.com’);
die();
}
}
Php de ip adresi engelleme
$ip = $_SERVER[‘REMOTE_ADDR’];
$ipArray = preg_replace(“#\r\n?|\n#”,””,file(‘IP.txt’));
foreach ($ipArray as $ipTest) {
if (substr_count($ip, $ipTest) != “0”) {
header(‘location: http://google.com’);
die();
}
}