Php de ip adresi engelleme

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();
}
}

Bana Ders Anlat © 2008-2022