我的人生路  
          日歷
          <2025年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789
          統(tǒng)計
          • 隨筆 - 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
          %>



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

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


          網(wǎng)站導航:
           
           
          Copyright © 一天一點愛戀 Powered by: 博客園 模板提供:滬江博客
          主站蜘蛛池模板: 玉门市| 额尔古纳市| 谷城县| 嘉黎县| 武清区| 凤翔县| 遂宁市| 石门县| 东乌珠穆沁旗| 牙克石市| 田东县| 锦屏县| 隆子县| 乾安县| 嵊州市| 老河口市| 神木县| 固原市| 苗栗市| 武威市| 伊宁市| 渝北区| 祁阳县| 茂名市| 虎林市| 吕梁市| 大名县| 仪陇县| 抚州市| 德令哈市| 沐川县| 固阳县| 泰兴市| 中卫市| 安达市| 邛崃市| 刚察县| 五台县| 望江县| 湛江市| 龙门县|