bu işini görür sanırım
<?php 
function GetIP(){ 
if(getenv("HTTP_CLIENT_IP")) { 
$ip = getenv("HTTP_CLIENT_IP"); 
} elseif(getenv("HTTP_X_FORWARDED_FOR")) { 
$ip = getenv("HTTP_X_FORWARDED_FOR"); 
if (strstr($ip, ',')) { 
$tmp = explode (',', $ip); 
$ip = trim($tmp[0]); 
} 
} else { 
$ip = getenv("REMOTE_ADDR"); 
} 
return $ip; 
} 
$ipler = array('12.12.36.69','12.12.36.68','12.12.36.9');
$kimlik = GetIP();
foreach($ipler as $ban){
if($ban == $kimlik){
header('Location: http://www.google.com/');exit();
}
}
?>