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

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

熱門標(biāo)簽:辦理400電話一年多少錢 為什么外呼系統(tǒng)需要預(yù)存話費(fèi)呢 咸陽銷售外呼系統(tǒng) 企數(shù)外呼系統(tǒng)能用多久 寧夏怎么申請400電話 蘭州智能語音電銷機(jī)器人功能 離線電子地圖標(biāo)注軟件注冊 外呼回?fù)芟到y(tǒng)圖片 常用地圖標(biāo)注范圍點(diǎn)
%
''獲取訪問者的地址
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代碼實(shí)現(xiàn)對IP的訪問限制的代碼
  • 用asp腳本實(shí)現(xiàn)限制IP訪問
  • 推薦的用Asp實(shí)現(xiàn)屏蔽IP地址訪問的代碼
  • ADSI+ASP添加IP到IIS禁止訪問列表中
  • 記錄游客頁面訪問IP的簡易實(shí)現(xiàn)代碼 (asp.net+txt)
  • 通過ASP禁止指定IP和只允許指定IP訪問網(wǎng)站的代碼
  • Asp限制IP訪問 阻止某一個IP段禁止訪問本站的代碼
  • asp實(shí)現(xiàn)限制一個ip只能訪問一次的方法

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

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《Asp下實(shí)現(xiàn)限制IP訪問的程序代碼》,本文關(guān)鍵詞  Asp,下,實(shí)現(xià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)文章
  • 下面列出與本文章《Asp下實(shí)現(xiàn)限制IP訪問的程序代碼》相關(guān)的同類信息!
  • 本頁收集關(guān)于Asp下實(shí)現(xiàn)限制IP訪問的程序代碼的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章