国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > regex > 正文

正則表達式檢查來訪IP是否合法的實際應用

2020-01-20 22:26:02
字體:
來源:轉載
供稿:網友
正則表達式檢查來訪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 

 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 和田市| 德昌县| 丰城市| 龙口市| 南丰县| 克拉玛依市| 贵溪市| 瓦房店市| 始兴县| 武清区| 蚌埠市| 云霄县| 宝清县| 高州市| 乐东| 昆明市| 济阳县| 富阳市| 体育| 南部县| 汨罗市| 灵石县| 永新县| 安龙县| 同德县| 盱眙县| 新绛县| 贺兰县| 桐柏县| 济宁市| 丰县| 司法| 武隆县| 宁阳县| 龙泉市| 大名县| 永平县| 兴宁市| 阳谷县| 溆浦县| 巴青县|