主页 > 知识库 > Asp下实现限制IP访问的程序代码

Asp下实现限制IP访问的程序代码

热门标签:办理400电话一年多少钱 为什么外呼系统需要预存话费呢 咸阳销售外呼系统 企数外呼系统能用多久 宁夏怎么申请400电话 兰州智能语音电销机器人功能 离线电子地图标注软件注册 外呼回拨系统图片 常用地图标注范围点
%
''获取访问者的地址
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代码实现对IP的访问限制的代码
  • 用asp脚本实现限制IP访问
  • 推荐的用Asp实现屏蔽IP地址访问的代码
  • ADSI+ASP添加IP到IIS禁止访问列表中
  • 记录游客页面访问IP的简易实现代码 (asp.net+txt)
  • 通过ASP禁止指定IP和只允许指定IP访问网站的代码
  • Asp限制IP访问 阻止某一个IP段禁止访问本站的代码
  • asp实现限制一个ip只能访问一次的方法

标签:泰州 铁岭 丽江 昆明 温州 咸阳 昌都 家电维修

巨人网络通讯声明:本文标题《Asp下实现限制IP访问的程序代码》,本文关键词  Asp,下,实现,限制,访问,的,;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 下面列出与本文章《Asp下实现限制IP访问的程序代码》相关的同类信息!
  • 本页收集关于Asp下实现限制IP访问的程序代码的相关信息资讯供网民参考!
  • 企业400电话

    智能AI客服机器人
    15000

    在线订购

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

    推荐文章