%
realip= Request.ServerVariables("HTTP_X_FORWARDED_FOR") '获取访问者真实的地址
if realip="" then
ip=Request.ServerVariables("REMOTE_ADDR") '获取访问者的地址
else
ip=realip
end if
allowip1="10.34.0.0" '第一允许IP段特点
allowip2="10.34.255.255" '暂时无用
allowip3="61.153.213.11" '具体允许IP地址
allowip4="61.129.69.126"
ipstr=split(ip,".")
allow1=split(allowip1,".")
allow2=split(allowip2,".")
allow3=split(allowip3,".")
allow4=split(allowip4,".")
for aa=0 to 1
for bb=0 to 3
if cint(allow1(aa))<> cint(ipstr(aa)) then
if cint(allow3(bb))<> cint(ipstr(bb)) then
if cint(allow4(bb))<> cint(ipstr(bb)) then
response.Redirect("http://diy.nhxx.net/repair/err.asp?err=1")
end if
end if
end if
next
next
%>
南海实验学校校务公开
<%
realip= Request.ServerVariables("HTTP_X_FORWARDED_FOR") '获取访问者真实的地址
if realip="" then
ip=Request.ServerVariables("REMOTE_ADDR") '获取访问者的地址
else
ip=realip
end if
allowip1="10.34.0.0" '第一允许IP段特点
allowip2="10.34.255.255" '暂时无用
allowip3="61.153.213.11" '具体允许IP地址
allowip4="61.129.69.126"
ipstr=split(ip,".")
allow1=split(allowip1,".")
allow2=split(allowip2,".")
allow3=split(allowip3,".")
allow4=split(allowip4,".")
for aa=0 to 1
for bb=0 to 3
if cint(allow1(aa))<> cint(ipstr(aa)) then
if cint(allow3(bb))<> cint(ipstr(bb)) then
if cint(allow4(bb))<> cint(ipstr(bb)) then
response.Redirect("http://diy.nhxx.net/repair/err.asp?err=1")
end if
end if
end if
next
next
%>