{"id":158,"date":"2013-07-30T08:00:00","date_gmt":"2013-07-30T00:00:00","guid":{"rendered":"http:\/\/31.0.2.219:81\/?p=158"},"modified":"2014-03-11T15:28:31","modified_gmt":"2014-03-11T07:28:31","slug":"asp%e9%99%90%e5%88%b6ip%e8%ae%bf%e9%97%ae-%e9%98%bb%e6%ad%a2%e6%9f%90%e4%b8%80%e4%b8%aaip%e6%ae%b5%e7%a6%81%e6%ad%a2%e8%ae%bf%e9%97%ae%e6%9c%ac%e7%ab%99%e7%9a%84%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"http:\/\/www.huike007.cn\/?p=158","title":{"rendered":"Asp\u9650\u5236IP\u8bbf\u95ee \u963b\u6b62\u67d0\u4e00\u4e2aIP\u6bb5\u7981\u6b62\u8bbf\u95ee\u672c\u7ad9\u7684\u4ee3\u7801"},"content":{"rendered":"<p>&lt;%<br \/>\n &#39;&#39;\u83b7\u53d6\u8bbf\u95ee\u8005\u7684\u5730\u5740<br \/>\n ip=Request.ServerVariables(&#34;REMOTE_ADDR&#34;)<br \/>\n &#39;&#39;\u5141\u8bb8\u7684IP\u5730\u5740\u6bb5\u4e3a10.0.0.0\uff5e10.68.63.255<br \/>\n allowip1=&#34;10.0.0.0&#34;<br \/>\n allowip2=&#34;10.68.10.71&#34;<br \/>\n response.writecheckip(ip,allowip1,allowip2)<br \/>\n functioncheckip(ip,allowip1,allowip2)<br \/>\n dimcheck(4)<br \/>\n checkip=false<br \/>\n ipstr=split(ip,&#34;.&#34;)<br \/>\n allow1=split(allowip1,&#34;.&#34;)<br \/>\n allow2=split(allowip2,&#34;.&#34;)<br \/>\n ifcint(allow1(0))&gt;cint(allow2(0))then&#39;&#39;\u5224\u65adIP\u5730\u5740\u6bb5\u662f\u5426\u5408\u6cd5<br \/>\n response.write&#34;\u7981\u6b62\u8bbf\u95ee&#34;<br \/>\n exitfunction<br \/>\n endif<br \/>\n fori=0toubound(ipstr)<br \/>\n ifcint(allow1(i))&lt;cint(allow2(i))then<br \/>\n ifcint(allow1(i))=cint(ipstr(i))then<br \/>\n check(i)=true<br \/>\n checkip=true<br \/>\n exitfor<br \/>\n else<br \/>\n ifcint(ipstr(i))&lt;cint(allow2(i))then<br \/>\n check(i)=true<br \/>\n checkip=true<br \/>\n exitfor<br \/>\n else<br \/>\n ifcint(ipstr(i))&gt;cint(allow2(i))then<br \/>\n check(i)=false<br \/>\n checkip=false<br \/>\n exitfor<br \/>\n else<br \/>\n check(i)=true<br \/>\n checkip=true<br \/>\n endif<br \/>\n endif<br \/>\n endif<br \/>\n else<br \/>\n ifcint(allow1(i))&gt;cint(ipstr(i))orcint(allow1(i))&lt;cint(ipstr(i))then<br \/>\n check(i)=false<br \/>\n checkip=false<br \/>\n ifi&lt;&gt;ubound(ipstr)then<br \/>\n exitfor<br \/>\n endif<br \/>\n else<br \/>\n check(i)=true<br \/>\n endif<br \/>\n endif<br \/>\n next<br \/>\n if(check(0)=trueandcheck(1)=trueandcheck(2)=trueandcheck(3)=false)and(cint(allow2(2))&gt;cint(ipstr(2)))then<br \/>\n checkip=true<br \/>\n endif<br \/>\n endfunction<br \/>\n %&gt;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lt;% &#39;&#39;\u83b7\u53d6\u8bbf\u95ee\u8005\u7684\u5730\u5740 ip=Request.ServerVariables(&#038;#3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[180,178],"tags":[],"_links":{"self":[{"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/posts\/158"}],"collection":[{"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=158"}],"version-history":[{"count":1,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/posts\/158\/revisions"}],"predecessor-version":[{"id":271,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/posts\/158\/revisions\/271"}],"wp:attachment":[{"href":"http:\/\/www.huike007.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=158"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}