脚本宝典收集整理的这篇文章主要介绍了正则表达式检查来访IP是否合法的实际应用,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
正则表达式检查来访IP
是否合法的实际应用&nbs
p; s
ub chkIP(boardid)
dim rsIP
dim ipArr
dim igno
red dim i
dim ip
dim
SQL ip=Request.Server
VARiables("REMOTE_ADDR")
ignored=false
if not i
SEMpty(boardid) then
sql="select ignor
eip
From board where boardid="&cstr(boardid)
set rsIP=conn.execute(sql)
if not (rsIP.eof and rsIP.bof) then
if instr(cstr(rsIP("ignoreip")&""),c
hr(13)&chr(10)) then
iparr=spl
IT(rsIP("ignoreip"),chr(13)&chr(10))
for i=0 to ubound(iparr)
if trim(iparr(i))<>"" and left(ip,len(trim(iparr(i))))=trim(iparr(i)) then
ignored=true
exit for
end if
next
else
iparr=rsIP("ignoreip")
if ip=trim(iparr) then
ignored=true
end if
end if
end if
rsIP.close
end if
if ignored then
response.write "<script language=javascript>window.location.href='ignoreip.htm'</script>"
end if
end sub
脚本宝典总结
以上是脚本宝典为你收集整理的正则表达式检查来访IP是否合法的实际应用全部内容,希望文章能够帮你解决正则表达式检查来访IP是否合法的实际应用所遇到的问题。
如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。