Quote:
Originally Posted by DJMaze
$ip_from = "192.168.0.0";
vs
$ip_from = "19.216.80.0";
What do both result in after you did str_replace(".","",$ip_from) in both?
And no, don't ask about IPv6 routines!!!!
|
Ahh, didn't think so far.
How about?
PHP Code:
$ip = $_SERVER['REMOTE_ADDR'];
$ip = explode(".",$ip);
$ip_from = "192.168.0.0";
$ip_to = "192.168.255.255";
$ip_from = explode(".",$ip_from);
$ip_to = explode(".",$ip_to);
$a = 0;
while($a <= 3) {
if ($ip[$a] < $ip[$a] || $ip[$a] > $ip_to[$a]) { die("Denied"); }
$a++;
}