www.gusucode.com > 盐城分类信息网asp源码程序 > inc/ip.asp
<% '*********************************** '本站由吉林信息网团队制作 '*********************************** '--------版权说明------------------ '吉林信息网官方网站:http://www.jl-e.com 'QQ:304133183 '*********************************** %><% 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 function Num2IP(nip) iip1 = int(nip/256/256/256) iip2 = int((nip-iip1*256*256*256)/256/256) iip3 = int((nip-iip1*256*256*256-iip2*256*256)/256) iip4 = int((nip-iip1*256*256*256-iip2*256*256-iip3*256) mod 256) iip0 = iip1 &"."& iip2 & "." &iip3 &"."& iip4 Num2IP = iip0 end function dim userIPnum userIPnum = IP2Num(Request.ServerVariables("REMOTE_ADDR")) sub msip() response.write ("<center>对不起,您非本地区用户,您的IP被禁止了!<br><br>有什么疑问直接与本站联系 QQ:776953,谢谢合作!</center>") response.write "<meta http-equiv=refresh content=""2;URL=index.asp"">" response.end end sub if Request.ServerVariables("HTTP_X_FORWARDED_FOR")="127.0.0.1" then call msip() End If '福建IP if userIPnum > IP2Num("61.131.0.0") and userIPnum < IP2Num("61.131.127.255") then call msip() end if if userIPnum > IP2Num("61.154.0.0") and userIPnum < IP2Num("61.154.255.255") then call msip() end if if userIPnum > IP2Num("202.101.97.0") and userIPnum < IP2Num("202.101.159.255") then call msip() end if if userIPnum > IP2Num("202.109.192.0") and userIPnum < IP2Num("202.109.255.255") then call msip() end if if userIPnum > IP2Num("61.241.195.0") and userIPnum < IP2Num("61.241.222.255") then call msip() end if if userIPnum > IP2Num("211.97.104.0") and userIPnum < IP2Num("211.97.161.255") then call msip() end if if userIPnum > IP2Num("218.5.0.0") and userIPnum < IP2Num("218.6.127.255") then call msip() end if if userIPnum > IP2Num("218.66.0.0") and userIPnum < IP2Num("218.67.127.255") then call msip() end if if userIPnum > IP2Num("211.138.128.0") and userIPnum < IP2Num("211.138.159.255") then call msip() end if if userIPnum > IP2Num("220.206.25.0") and userIPnum < IP2Num("220.207.254.254") then call msip() end if if userIPnum > IP2Num("220.209.25.0") and userIPnum < IP2Num("220.213.255.255") then call msip() end if if userIPnum > IP2Num("127.0.0.0") and userIPnum < IP2Num("127.0.0.9") then call msip() end if if userIPnum > IP2Num("192.168.0.0") and userIPnum < IP2Num("192.168.255.255") then call msip() end if if userIPnum > IP2Num("220.192.64.0") and userIPnum < IP2Num("220.192.71.254") then call msip() end if if userIPnum > IP2Num("220.192.71.104") and userIPnum < IP2Num("220.192.71.254") then call msip() end if if userIPnum > IP2Num("222.76.0.0") and userIPnum < IP2Num("222.79.255.255") then call msip() end if if userIPnum > IP2Num("218.85.0.0") and userIPnum < IP2Num("218.86.127.255") then call msip() end if if userIPnum > IP2Num("220.160.0.0") and userIPnum < IP2Num("220.162.255.255") then call msip() end if if userIPnum > IP2Num("211.138.127.0") and userIPnum < IP2Num("211.138.150.255") then call msip() end if if userIPnum > IP2Num("211.143.144.0") and userIPnum < IP2Num("211.143.220.255") then call msip() end if if userIPnum > IP2Num("59.60.0.0") and userIPnum < IP2Num("59.61.255.255") then call msip() end if if userIPnum > IP2Num("59.60.25.0") and userIPnum < IP2Num("59.61.255.255") then call msip() end if if userIPnum > IP2Num("59.56.0.0") and userIPnum < IP2Num("59.61.255.255") then call msip() end if if userIPnum > IP2Num("220.192.0.0") and userIPnum < IP2Num("220.202.255.255") then call msip() end if if userIPnum > IP2Num("59.56.0.0") and userIPnum < IP2Num("59.62.255.255") then call msip() end if '广东IP if userIPnum > IP2Num("59.32.0.0") and userIPnum < IP2Num("59.36.47.255") then call msip() end if if userIPnum > IP2Num("202.38.140.0") and userIPnum < IP2Num("202.38.172.255") then call msip() end if if userIPnum > IP2Num("202.96.128.0") and userIPnum < IP2Num("202.96.191.255") then call msip() end if if userIPnum > IP2Num("202.103.128.0") and userIPnum < IP2Num("202.105.255.255") then call msip() end if if userIPnum > IP2Num("203.88.32.0") and userIPnum < IP2Num("203.88.62.255") then call msip() end if if userIPnum > IP2Num("203.88.192.0") and userIPnum < IP2Num("203.93.230.255") then call msip() end if if userIPnum > IP2Num("210.5.0.0") and userIPnum < IP2Num("210.5.31.255") then call msip() end if if userIPnum > IP2Num("210.6.150.0") and userIPnum < IP2Num("210.6.150.255") then call msip() end if if userIPnum > IP2Num("210.12.9.0") and userIPnum < IP2Num("210.14.254.255") then call msip() end if if userIPnum > IP2Num("210.21.0.0") and userIPnum < IP2Num("210.22.35.255") then call msip() end if if userIPnum > IP2Num("211.96.23.0") and userIPnum < IP2Num("211.97.63.255") then call msip() end if if userIPnum > IP2Num("211.98.4.0") and userIPnum < IP2Num("211.98.165.255") then call msip() end if if userIPnum > IP2Num("211.136.12.0") and userIPnum < IP2Num("211.136.253.255") then call msip() end if if userIPnum > IP2Num("211.139.128.0") and userIPnum < IP2Num("211.139.255.255") then call msip() end if if userIPnum > IP2Num("211.146.208.0") and userIPnum < IP2Num("211.148.223.255") then call msip() end if if userIPnum > IP2Num("218.13.0.0") and userIPnum < IP2Num("218.20.255.255") then call msip() end if if userIPnum > IP2Num("58.60.0.0") and userIPnum < IP2Num("58.63.255.255") then call msip() end if if userIPnum > IP2Num("219.128.0.0") and userIPnum < IP2Num("219.137.255.255") then call msip() end if if userIPnum > IP2Num("220.197.0.0") and userIPnum < IP2Num("220.205.255.255") then call msip() end if if userIPnum > IP2Num("61.141.0.0") and userIPnum < IP2Num("61.141.255.255") then call msip() end if %> <% '*********************************** '本站由吉林信息网团队制作 '*********************************** '--------版权说明------------------ '吉林信息网官方网站:http://www.jl-e.com 'QQ:304133183 '*********************************** %>