脚本宝典收集整理的这篇文章主要介绍了如何验证IP地址?,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
sub chkIP(boardid)
dim rsIP
dim ipArr
dim ignored
dim i
dim ip
dim SQL
ip=Request.ServerVARiables("REMOTE_ADDR")
ignored=false
if not iSEMpty(boardid) then
sql="select ignoreip From board where boardid="&cstr(boardid)
set rsIP=conn.execute(sql)
if not (rsIP.eof and rsIP.bof) then
if instr(cstr(rsIP("ignoreip")&""),chr(13)&chr(10)) then
iparr=splIT(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,请注明来意。