婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識(shí)庫 > ASP中實(shí)現(xiàn)限制IP的函數(shù)詳解

ASP中實(shí)現(xiàn)限制IP的函數(shù)詳解

熱門標(biāo)簽:為什么外呼系統(tǒng)需要預(yù)存話費(fèi)呢 咸陽銷售外呼系統(tǒng) 企數(shù)外呼系統(tǒng)能用多久 離線電子地圖標(biāo)注軟件注冊 外呼回?fù)芟到y(tǒng)圖片 辦理400電話一年多少錢 常用地圖標(biāo)注范圍點(diǎn) 蘭州智能語音電銷機(jī)器人功能 寧夏怎么申請(qǐng)400電話
'******************************
'Function CheckIp(cInput_Ip,cBound_Ip)
'Created by qqdao, qqdao@263.net 2001/11/28
'說明:首先需要根據(jù);號(hào)循環(huán),然后判斷是否含有"-",如果有則進(jìn)行拆分處理,最后判斷是否在范圍內(nèi)
'參數(shù): cInput_Ip,代檢查的ip
'cBound_Ip,給定的范圍格式為,單個(gè)ip,和范圍ip,范圍ip最后使用”-“分割,如果是“*”則必須放到最后一位
'每個(gè)范圍后添加":ALLOW"表示允許登陸,添加":REFUSE"表示拒絕登陸。多個(gè)范圍用”;“隔開
'例如192.168.1*.*:ALLOW;192.168.1.1:ALLOW;192.168.1.1-10:REFUSE"
'返回值: true/false
'更新:2001/12/05 支持ALLOW,REFUSE支持'*‘,不想對(duì)?支持,因?yàn)楹?差不多
'******************************
function CheckIp(cInput_Ip,cBound_Ip)
dim cSingle_Ip,cTemp_IP,cStart_IP,cEnd_Ip
CheckIp = false
cSingle_Ip=split(cBound_Ip,";")

for i=0 to ubound(cSingle_Ip)
if Instr(cSingle_Ip(i),"REFUSE") > 0 then “就是拒絕了
cTemp_IP = left(cSingle_Ip(i),instr(cSingle_Ip(i),":")-1)

if Instr(cTemp_IP,"*") > 0 then “是寬范圍
cStart_IP = left(cTemp_IP,instr(cTemp_IP,"*")-1)
if left(cInput_Ip,len(cStart_IP))=cStart_IP then
CheckIp = false
exit function
end if
end if

if Instr(cTemp_IP,"-") = 0 then
cStart_IP = cTemp_IP
cEnd_Ip = cTemp_IP
else
cStart_IP = left(cTemp_IP,instr(cTemp_IP,"-")-1)
cEnd_Ip = left(cStart_IP,InStrRev(cStart_IP,".")-1)+"."+mid(cTemp_IP,instr(cTemp_IP,"-")+1)
end if

if Ip2Str(cInput_Ip)>=Ip2Str(cStart_IP) and Ip2Str(cInput_Ip)=Ip2Str(cEnd_Ip) then
CheckIp = false
exit function
end if

elseif Instr(cSingle_Ip(i),"ALLOW") > 0 then “允許

cTemp_IP = left(cSingle_Ip(i),instr(cSingle_Ip(i),":")-1)

if Instr(cTemp_IP,"*") > 0 then “是寬范圍
cStart_IP = left(cTemp_IP,instr(cTemp_IP,"*")-1)
if left(cInput_Ip,len(cStart_IP))=cStart_IP then
CheckIp = true
end if
end if

if Instr(cTemp_IP,"-") = 0 then
cStart_IP = cTemp_IP
cEnd_Ip = cTemp_IP
else
cStart_IP = left(cTemp_IP,instr(cTemp_IP,"-")-1)
cEnd_Ip = left(cStart_IP,InStrRev(cStart_IP,".")-1)+"."+mid(cTemp_IP,instr(cTemp_IP,"-")+1)
end if

if Ip2Str(cInput_Ip)>=Ip2Str(cStart_IP) and Ip2Str(cInput_Ip)=Ip2Str(cEnd_Ip) then
CheckIp =true
else
CheckIp =false
end if
end if
next

end function
'******************************
'Function Ip2Str(cIp)
'Created by qqdao, qqdao@263.net 2001/11/28
'參考動(dòng)網(wǎng)ip算法
'參數(shù):cIp ip地址
'返回值: 轉(zhuǎn)換后數(shù)值
'******************************
function Ip2Str(cIp)
Dim str1,str2,str3,str4
Dim cIp_Temp
if cIp="127.0.0.1" then cIp="192.168.0.1"
str1=left(cIp,instr(cIp,".")-1)
cIp_Temp=mid(cIp,instr(cIp,".")+1)
str2=left(cIp_Temp,instr(cIp_Temp,".")-1)
cIp_Temp=mid(cIp_Temp,instr(cIp_Temp,".")+1)
str3=left(cIp_Temp,instr(cIp_Temp,".")-1)
str4=mid(cIp_Temp,instr(cIp_Temp,".")+1)

if isNumeric(str1)=0 or isNumeric(str2)=0 or isNumeric(str3)=0 or isNumeric(str4)=0 then

else
Ip2Str=cint(str1)*256*256*256+cint(str2)*256*256+cint(str3)*256+cint(str4)-1
end if

end function 

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

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《ASP中實(shí)現(xiàn)限制IP的函數(shù)詳解》,本文關(guān)鍵詞  ASP,中,實(shí)現(xiàn),限制,的,函數(shù),;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《ASP中實(shí)現(xiàn)限制IP的函數(shù)詳解》相關(guān)的同類信息!
  • 本頁收集關(guān)于ASP中實(shí)現(xiàn)限制IP的函數(shù)詳解的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 二连浩特市| 成武县| 合水县| 太康县| 收藏| 武邑县| 信丰县| 沂源县| 涟源市| 荥阳市| 宁海县| 松江区| 唐河县| 祥云县| 陆河县| 长垣县| 定日县| 东阿县| 汨罗市| 疏勒县| 盐亭县| 景谷| 恩施市| 武汉市| 许昌县| 鲁甸县| 灵山县| 尼玛县| 乐昌市| 合山市| 梨树县| 泽普县| 桃源县| 大石桥市| 都兰县| 施甸县| 共和县| 饶河县| 大余县| 南乐县| 合川市|