<?php
$banned_ip = array();
$banned_ip[] = '111.111.111.110'; // first IP
$banned_ip[] = '111.111.111.111'; // second IP
$banned_ip[] = '111.111.111.112'; // third IP, just add more if you need
foreach($banned_ip as $banned) {
$ip = $_SERVER['REMOTE_ADDR'];
if($ip == $banned){
echo "You have been banned! Sorry!";
exit();
}
}
// The rest of your PHP script goes here
?>
Tag : - - - -
Date :
14 ก.ย. 2551 00:17:23
By :
กัน
View :
2136
Reply :
2
No. 1
Guest
<?php
$banned_ip = array();
$banned_ip[] = '111.111.111.110'; // first IP
$banned_ip[] = '111.111.111.111'; // second IP
$banned_ip[] = '111.111.111.112'; // third IP, just add more if you need