|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
限制某段IP地址访问网页的一个列子: function IP2Num(sip) dim str1,str2,str3,str4 dim num IP2Num=0 if isnumeric(left(sip,2)) then str1=left(sip,instr(sip,".")-1) sip=mid(sip,instr(sip,".")+1) str2=left(sip,instr(sip,".")-1) sip=mid(sip,instr(sip,".")+1) str3=left(sip,instr(sip,".")-1) str4=mid(sip,instr(sip,".")+1) num=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1 IP2Num = num end if end function userIPnum = IP2Num(Request.ServerVariables("REMOTE_ADDR")) if userIPnum > IP2Num("192.168.0.0") and userIPnum < IP2Num("192.168.0.255") then response.write ("<center>您的IP被禁止</center>") response.end end if 返回类别: 教程 上一教程: 查看服务器APPLICATION/SESSION变量工具 下一教程: ASP 3.0高级编程(十五) 您可以阅读与"限制某段IP地址"相关的教程: · 用Javascript隐藏超级链接的真实地址 · IP限制函数 · ASP中限制IP函数详解 · 利用代码实现对IP的访问限制 · 通过网络域名得到这台主机的IP地址 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |