{"id":43,"date":"2007-08-21T16:10:19","date_gmt":"2007-08-21T08:10:19","guid":{"rendered":"http:\/\/www.cnmiss.cn\/?p=42"},"modified":"2010-12-02T06:31:46","modified_gmt":"2010-12-02T06:31:46","slug":"asp%e9%99%90%e5%88%b6ip%e8%ae%bf%e9%97%ae","status":"publish","type":"post","link":"https:\/\/www.cnmiss.cn\/?p=43","title":{"rendered":"Asp\u9650\u5236IP\u8bbf\u95ee"},"content":{"rendered":"<blockquote><p>&lt;%<br \/>&#39;&#39;\u83b7\u53d6\u8bbf\u95ee\u8005\u7684\u5730\u5740<br \/>ip=Request.ServerVariables(&quot;REMOTE_ADDR&quot;) <\/p>\n<p>&#39;&#39;\u5141\u8bb8\u7684IP\u5730\u5740\u6bb5\u4e3a10.0.0.0\uff5e10.68.63.255<br \/>allowip1=&quot;10.0.0.0&quot;<br \/>allowip2=&quot;10.68.10.71&quot;<br \/>response.write checkip(ip,allowip1,allowip2)<br \/>function checkip(ip,allowip1,allowip2)<br \/>dim check(4)<br \/>checkip=false<br \/>ipstr=split(ip,&quot;.&quot;)<br \/>allow1=split(allowip1,&quot;.&quot;)<br \/>allow2=split(allowip2,&quot;.&quot;)<br \/>if cint(allow1(0))&gt;cint(allow2(0)) then &#39;&#39;\u5224\u65adIP\u5730\u5740\u6bb5\u662f\u5426\u5408\u6cd5<br \/>response.write &quot;\u7981\u6b62\u8bbf\u95ee&quot;<br \/>exit function<br \/>end if<br \/>for i=0 to ubound(ipstr)<br \/>if cint(allow1(i))&lt;cint(allow2(i)) then<br \/>if cint(allow1(i))=cint(ipstr(i)) then<br \/>check(i)=true<br \/>checkip=true<br \/>exit for<br \/>else<br \/>if cint(ipstr(i))&lt;cint(allow2(i)) then<br \/>check(i)=true<br \/>checkip=true<br \/>exit for<br \/>else<br \/>if cint(ipstr(i))&gt;cint(allow2(i)) then<br \/>check(i)=false<br \/>checkip=false<br \/>exit for<br \/>else<br \/>check(i)=true<br \/>checkip=true<br \/>end if<br \/>end if<br \/>end if<br \/>else<br \/>if cint(allow1(i))&gt;cint(ipstr(i)) or cint(allow1(i))&lt;cint(ipstr(i)) then<br \/>check(i)=false<br \/>checkip=false<br \/>if i&lt;&gt;ubound(ipstr) then<br \/>exit for<br \/>end if<br \/>else<br \/>check(i)=true<br \/>end if<br \/>end if<br \/>next<br \/>if (check(0)=true and check(1)=true and check(2)=true and check(3)=false) and (cint(allow2(2))&gt;cint(ipstr(2))) then<br \/>checkip=true<br \/>end if<br \/>end function<br \/>%&gt;<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>&lt;%&#39;&#39;\u83b7\u53d6\u8bbf\u95ee\u8005\u7684\u5730\u5740ip=Request.Server &hellip; <a href=\"https:\/\/www.cnmiss.cn\/?p=43\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13],"class_list":["post-43","post","type-post","status-publish","format-standard","hentry","category-xxbj","tag-asp"],"_links":{"self":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts\/43","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=43"}],"version-history":[{"count":0,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts\/43\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=43"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=43"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=43"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}