<%
''获取访问者的地址
ip = request.servervariables( "remote_addr")
'允许的IP地址段为10.0.0.0〜10.68.63.255
AlowIP1 = "10.0.0.0"
AlowIP2 = "10.68.10.71"
respons.writeCheckip(ip、aotadip1、lowip2)
functionCheckip(IP、lowip1、aothip2)
Dimcheck(4)
checkip = false
ipsstr = split(ip、 "。")
Alow1 = split(loadip1、 "。")
Alow2 = split(approwip2、 "。")
ifcint(lock1(0))> cint(lock2(0))then ''判断ip地址段是否合法
Response.Write "禁止访问"
exitFunction
endif
fori = 0toubound(ipstr)
ifcint(aopt1(i))<cint(lock2(i))then
ifcint(aopt1(i))= cint(ipstr(i))then
(i)= trueをチェックしてください
checkip = true
exitfor
それ以外
ifcint(ipstr(i))<cint(lock2(i))then
(i)= trueをチェックしてください
checkip = true
exitfor
それ以外
ifcint(ipstr(i))> cint(aopt2(i))then
(i)= falseを確認してください
checkip = false
exitfor
それ以外
(i)= trueをチェックしてください
checkip = true
endif
endif
endif
それ以外
ifcint(approw1(i))> cint(ipstr(i))orcint(aopt1(i))<cint(ipstr(i))then
(i)= falseを確認してください
checkip = false
ifi <> ubound(ipstr)then
exitfor
endif
それ以外
(i)= trueをチェックしてください
endif
endif
次
if(check(0)= trueandcheck(1)= trueandcheck(2)= trueandcheck(3)= false)および(cint(lock2(2))> cint(ipstr(2)))then
checkip = true
endif
エンド機能
%>