$ip_adresleri = array("1.1.1.1", "1.1.1.2");

$ip = getenv('HTTP_CLIENT_IP')?:
getenv('HTTP_X_FORWARDED_FOR')?:
getenv('HTTP_X_FORWARDED')?:
getenv('HTTP_FORWARDED_FOR')?:
getenv('HTTP_FORWARDED')?:
getenv('REMOTE_ADDR');

if(in_array($ip, $ip_adresleri)) {
header('Location: 'adres');
die();
}