我的人生路  
          日歷
          <2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789
          統計
          • 隨筆 - 74
          • 文章 - 57
          • 評論 - 7
          • 引用 - 0

          導航

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          相冊

          顏色

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

           

          <%
          '獲取訪問者的地址
          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 "IP地址段出錯!"
          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
          %>



          歡迎大家訪問我的個人網站 萌萌的IT人
          posted on 2005-07-07 15:39 一天一點愛戀 閱讀(151) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
           
          Copyright © 一天一點愛戀 Powered by: 博客園 模板提供:滬江博客
          主站蜘蛛池模板: 二连浩特市| 博客| 砀山县| 剑川县| 定西市| 九寨沟县| 镇原县| 天台县| 泾源县| 北票市| 商丘市| 建水县| 洛隆县| 牟定县| 和静县| 屏东县| 万全县| 锡林浩特市| 松溪县| 交城县| 慈溪市| 罗城| 荆州市| 当阳市| 任丘市| 习水县| 固镇县| 宁蒗| 南陵县| 丽江市| 神池县| 昆明市| 大洼县| 株洲市| 石家庄市| 绵阳市| 天峻县| 临汾市| 抚松县| 郑州市| 邹城市|