[ 2005/11/08 13:54 | by 网络毛毛虫 ]
| |

<?
$ip=$_SERVER[REMOTE_ADDR];
echo"$ip<br>";
$ip = str_replace(".","",$ip);
//echo $ip;
$ipstart_1="202.202.149.1";//IP地址段1起始
$ipend_1="202.202.159.9";//IP地址段1结束
$ipstart_2="218.194.149.1";//IP地址段2起始
$ipend_2="218.194.159.9";//IP地址段2结束
$ipstart_3="222.198.30.1";//IP地址段3起始
$ipend_3="222.198.59.9";//IP地址段3结束
$ipstart_4="222.198.30.10";//IP地址段3起始
$ipend_4="222.198.59.99";//IP地址段3结束
$ipstart_5="222.198.30.100";//IP地址段3起始
$ipend_5="222.198.59.255";//IP地址段3结束
$ipstart_6="218.194.149.10";//IP地址段2起始
$ipend_6="218.194.159.99";//IP地址段2结束
$ipstart_7="218.194.149.100";//IP地址段2起始
$ipend_7="218.194.159.255";//IP地址段2结束
$ipstart_8="202.202.149.10";//IP地址段1起始
$ipend_8="202.202.159.99";//IP地址段1结束
$ipstart_9="202.202.149.100";//IP地址段1起始
$ipend_9="202.202.159.255";//IP地址段1结束
function ip_zh($ip_d)
{
$ip_z=str_replace(".","",$ip_d);
return $ip_z;
}
if((($ip>ip_zh($ipstart_1)) && ($ip<ip_zh($ipend_1)))||(($ip>ip_zh($ipstart_2)) && ($ip<ip_zh($ipend_2)))||(($ip>ip_zh($ipstart_3)) && ($ip<ip_zh($ipend_3)))
||(($ip>ip_zh($ipstart_4)) && ($ip<ip_zh($ipend_4)))
||(($ip>ip_zh($ipstart_5)) && ($ip<ip_zh($ipend_5)))
||(($ip>ip_zh($ipstart_6)) && ($ip<ip_zh($ipend_6)))
||(($ip>ip_zh($ipstart_7)) && ($ip<ip_zh($ipend_7)))
||(($ip>ip_zh($ipstart_8)) && ($ip<ip_zh($ipend_8)))
||(($ip>ip_zh($ipstart_9)) && ($ip<ip_zh($ipend_9))))
{
echo"祝贺你,通过验证,校内IP。";
}
else
{
echo"<center><font color=red>对不起,请见谅!你的IP不符合规范,5秒后载入计算机学办网站</font><meta http-equiv='Refresh'
content='5; url=http://jsjxb.cqit.edu.cn'><NOSCRIPT>";
}
?>

技术文章 | 评论(0) | 引用(0) | 阅读(2342)
 
发表评论
   
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]