qm8309
05-06-2003, 11:55 PM
i found the following codes to ban ip addresses from executing a script.
<?php
$banned_ip = array();
$banned_ip[] = '11.111.11.x';
foreach($banned_ip as $banned) {
$ip = $_SERVER['REMOTE_ADDR'];
if($ip == $banned){
echo "You have been banned!";
exit();
}
}
// rest of PHP Script here!
i want to know, if i replace 11.111.11.x with 11.111.11.
will this script ban the entire 11.111.11 ip range? or any modification requried?
thanks.
<?php
$banned_ip = array();
$banned_ip[] = '11.111.11.x';
foreach($banned_ip as $banned) {
$ip = $_SERVER['REMOTE_ADDR'];
if($ip == $banned){
echo "You have been banned!";
exit();
}
}
// rest of PHP Script here!
i want to know, if i replace 11.111.11.x with 11.111.11.
will this script ban the entire 11.111.11 ip range? or any modification requried?
thanks.
