PHP
0
Вклад в тег
function test_IP()
{
$IPs_arr = array
(
array('xxx.xxx.xxx.xxx', 'xxx.xxx.255.255')
);
$my_ip2long = @ip2long($_SERVER['REMOTE_ADDR']);
foreach ($IPs_arr as $IPs) {
if ($my_ip2long >= @ip2long($IPs[0]) && $my_ip2long <= @ip2long($IPs[1]))
return "1";
}
return "2";
}
test_IP();