麻辣堂|资源主站|开发论坛|在线手册
首页 Apache Linux Java MySQL 注册帮助 
PHP项目开发组是PHP开发资源网于2007组年建成立的项目开发团队,目前核心开发成员有27人, 项目协作成员8名.下设7个开发组,主要承接大/中型网站项目开发任务。

    由于开发任务较多,人员比较紧张,现面向社会招聘全职或者兼职开发人员,不管你是在校大学生,还是全职开发人员,以及SOHO都可以联系本站,我们可以长期合作,并为您带来丰厚的报酬。
  您现在的位置:PHP开发资源网 > 麻辣堂 > 详细资料
待解决
如何限制ip访问网页
悬赏分:20 - 2007年08月15日

如何限制ip访问网页

提问者:sichuan   08-15 17:05
答复
sasa
回答者:PHP爱好者 - 瓦岗村民 03-24 12时
<% \'\'获取访问者的地址 ip=Request.ServerVariables(\"REMOTE_ADDR\") \'\'允许的IP地址段为10.0.0.0~10.68.63.255 allowip1=\"10.0.0.0\" allowip2=\"10.68.10.71\" response.write checkip(ip,allowip1,allowip2) function checkip(ip,allowip1,allowip2) dim check(4) checkip=false ipstr=split(ip,\".\") allow1=split(allowip1,\".\") allow2=split(allowip2,\".\") if cint(allow1(0))>cint(allow2(0)) then \'\'判断IP地址段是否合法 response.write \"禁止访问\" exit function end if for i=0 to ubound(ipstr) if cint(allow1(i))cint(allow2(i)) then check(i)=false checkip=false exit for else check(i)=true checkip=true end if end if end if else if cint(allow1(i))>cint(ipstr(i)) or cint(allow1(i))ubound(ipstr) then exit for end if else check(i)=true end if end if next if (check(0)=true and check(1)=true and check(2)=true and check(3)=false) and (cint(allow2(2))>cint(ipstr(2))) then checkip=true end if end function %>
回答者:PHP爱好者 - 瓦岗村民 12-06 16时
我也来回答:
不管你有没有帮助我们,瓦岗寨8万村民将感谢你。。。。。

为防止灌水,您需要计算一道数学题: 答案:
20 + 30 = ? 请将计算结果填在上面

 
[]
©2007 PhpRes.COM