主頁 > 知識庫 > 如何驗證IP地址?

如何驗證IP地址?

熱門標簽:檢查注冊表項 網(wǎng)站文章發(fā)布 智能手機 鐵路電話系統(tǒng) 銀行業(yè)務(wù) 服務(wù)器配置 呼叫中心市場需求 美圖手機

 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

標簽:沈陽 新疆 上海 滄州 紅河 樂山 河南 長治

巨人網(wǎng)絡(luò)通訊聲明:本文標題《如何驗證IP地址?》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266