主頁 > 知識庫 > Asp下實現(xiàn)限制IP訪問的程序代碼

Asp下實現(xiàn)限制IP訪問的程序代碼

熱門標簽:辦理400電話一年多少錢 為什么外呼系統(tǒng)需要預存話費呢 咸陽銷售外呼系統(tǒng) 企數(shù)外呼系統(tǒng)能用多久 寧夏怎么申請400電話 蘭州智能語音電銷機器人功能 離線電子地圖標注軟件注冊 外呼回撥系統(tǒng)圖片 常用地圖標注范圍點
%
''獲取訪問者的地址
ip=Request.ServerVariables("REMOTE_ADDR") 

''允許的IP地址段為10.0.0.0~10.68.63.255
allowip1="10.0.0.0"
allowip2="10.68.10.71"
response.write checkip(ip,allowip1,allowip2)
function checkip(ip,allowip1,allowip2)
dim check(4)
checkip=false
ipstr=split(ip,".")
allow1=split(allowip1,".")
allow2=split(allowip2,".")
if cint(allow1(0))>cint(allow2(0)) then ''判斷IP地址段是否合法
response.write "禁止訪問"
exit function
end if
for i=0 to ubound(ipstr)
if cint(allow1(i))cint(allow2(i)) then
if cint(allow1(i))=cint(ipstr(i)) then
check(i)=true
checkip=true
exit for
else
if cint(ipstr(i))cint(allow2(i)) then
check(i)=true
checkip=true
exit for
else
if cint(ipstr(i))>cint(allow2(i)) then
check(i)=false
checkip=false
exit for
else
check(i)=true
checkip=true
end if
end if
end if
else
if cint(allow1(i))>cint(ipstr(i)) or cint(allow1(i))cint(ipstr(i)) then
check(i)=false
checkip=false
if i>ubound(ipstr) then
exit for
end if
else
check(i)=true
end if
end if
next
if (check(0)=true and check(1)=true and check(2)=true and check(3)=false) and (cint(allow2(2))>cint(ipstr(2))) then
checkip=true
end if
end function
%>
您可能感興趣的文章:
  • ASP.net做的IP訪問限制
  • 用ASP代碼實現(xiàn)對IP的訪問限制的代碼
  • 用asp腳本實現(xiàn)限制IP訪問
  • 推薦的用Asp實現(xiàn)屏蔽IP地址訪問的代碼
  • ADSI+ASP添加IP到IIS禁止訪問列表中
  • 記錄游客頁面訪問IP的簡易實現(xiàn)代碼 (asp.net+txt)
  • 通過ASP禁止指定IP和只允許指定IP訪問網站的代碼
  • Asp限制IP訪問 阻止某一個IP段禁止訪問本站的代碼
  • asp實現(xiàn)限制一個ip只能訪問一次的方法

標簽:泰州 鐵嶺 麗江 昆明 溫州 咸陽 昌都 家電維修

巨人網絡通訊聲明:本文標題《Asp下實現(xiàn)限制IP訪問的程序代碼》,本文關鍵詞  Asp,下,實現(xiàn),限制,訪問,的,;如發(fā)現(xiàn)本文內容存在版權問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內容系統(tǒng)采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Asp下實現(xiàn)限制IP訪問的程序代碼》相關的同類信息!
  • 本頁收集關于Asp下實現(xiàn)限制IP訪問的程序代碼的相關信息資訊供網民參考!
  • 企业400电话

    智能AI客服机器人
    15000

    在线订购

    合计11份范本:公司章程+合伙协议+出资协议+合作协议+股权转让协议+增资扩股协议+股权激励+股东会决议+董事会决议

    推薦文章