Ban Access from an IP address

GZ - Ban IP


<? 
// BAN IP START
$banned[]="194.8.75.141"; // Single Ip to ban
$banned[]="213.5.71.12"; // You can specific more
//$banned[]="123.456.78."; // Ban complete C-Class
//$banned[]="123.456."; // or ...
//$banned[]="123."; // or ...
if($banned){
foreach ($banned AS $bannedIP){
if(eregi("^$bannedIP",$_SERVER['REMOTE_ADDR'])){
header('Location: http://www.g-zona.com/buu.php');
// redirect banned user to some page
exit();
}
}
}
// BAN IP END
?>

comments (1)

User Comments (1)

( ADD YOURS ) ( GET GRAVATAR )
  1. axothget-online

    axothget-online 10.03.2010

    necesidad de comprobar:)

    ( Reply )

Notice: Undefined index: gotovo in /home/content/g/u/t/gutovic/html/full.php on line 249

 

« Older posts