|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
<% \\\'获取访问者的地址 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 "IP地址段出错!" exit function end if for i=0 to ubound(ipstr) if cint(allow1(i))<cint(allow2(i)) then if cint(allow1(i))=cint(ipstr(i)) then check(i)=true checkip=true exit for else if cint(ipstr(i))<cint(allow2(i)) then check(i)=true checkip=true exit for else if cint(ipstr(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))<cint(ipstr(i)) then check(i)=false checkip=false if 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 %> 返回类别: 教程 上一教程: 建立三层结构的ASP应用程序 下一教程: ASP+ACCESS的安全隐患及对策 您可以阅读与"ASP 中对 IP 进行过滤限制函数"相关的教程: · ASP中对IP进行过滤限制函数 · asp 中对 ip 进行过滤限制函数 · IP限制函数 · ASP中限制IP函数详解 · ASP自动生成JAVASCRIPT检验函数 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |