{"id":3279,"date":"2018-03-27T15:11:28","date_gmt":"2018-03-27T07:11:28","guid":{"rendered":"http:\/\/cn.hostease.com\/xueyuan\/?p=3279"},"modified":"2018-03-27T15:11:28","modified_gmt":"2018-03-27T07:11:28","slug":"asp%e5%ae%9e%e7%8e%b0%e9%99%90%e5%88%b6%e4%b8%80%e4%b8%aaip%e5%8f%aa%e8%83%bd%e8%ae%bf%e9%97%ae%e4%b8%80%e6%ac%a1%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/cn.hostease.com\/xueyuan\/jishu\/asp%e5%ae%9e%e7%8e%b0%e9%99%90%e5%88%b6%e4%b8%80%e4%b8%aaip%e5%8f%aa%e8%83%bd%e8%ae%bf%e9%97%ae%e4%b8%80%e6%ac%a1%e7%9a%84%e6%96%b9%e6%b3%95\/","title":{"rendered":"asp\u5b9e\u73b0\u9650\u5236\u4e00\u4e2aip\u53ea\u80fd\u8bbf\u95ee\u4e00\u6b21\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>\u9650\u5236\u4e00\u4e2aip\u53ea\u80fd\u8bbf\u95ee\u4e00\u6b21\uff0c\u73b0\u5728\u5c06asp\u4ee3\u7801\u5206\u4eab\u7ed9\u5927\u5bb6\uff1a<\/p>\n<div class=\"jb51code\">\n<pre class=\"brush:csharp;\">&lt;% \r\n'\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ \r\n'\/\/ \/\/ \r\n'\/\/\u4f5c\u7528\uff1a\u4e00\u4e2aIP\u5730\u5740\u53ea\u5141\u8bb8\u8bbf\u95ee\u672c\u9875\u4e00\u6b21 \/\/ \r\n'\/\/\u5f15\u7528\uff1a&lt;!-- #include file=\"Check_Ip.asp\" --&gt; \/\/ \r\n'\/\/ \/\/ \r\n'\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ \r\n\r\n'Response.Charset = 936 '\u8bbe\u7f6e\u8f93\u51fa\u7f16\u7801\u4e3a\u7b80\u4f53\u4e2d\u6587 \r\n'Response.Buffer = false '\u5173\u95ed\u7f13\u51b2\u533a \r\n\r\nDim Fso,ts,IpList,Cfs \r\n\r\n'\u8bbe\u7f6eCookies\u51fd\u6570 \r\nFunction SetCookie() \r\nResponse.Cookies(\"IsBrow\") = \"Brow\" \r\nResponse.Cookies(\"IsBrow\").Expires = Date+365 \r\nEnd Function \r\n\r\n'\u8bb0\u5f55IP\u5730\u5740\u51fd\u6570 \r\nFunction WriteIp(FileName, IpAddress) \r\nSet Fso = Server.CreateObject(\"Scripting.FileSystemObject\") \r\nSet ts = Fso.OpenTextFile(Server.MapPath(FileName),8,true) \r\nts.WriteLine IpAddress \r\nts.Close \r\nSet ts = Nothing \r\nSet Fso = Nothing \r\nEnd Function \r\n\r\n'\u8bfb\u53d6IP\u5730\u5740\u51fd\u6570 \r\nFunction ReadIpList(FileName) \r\nSet Fso = Server.CreateObject(\"Scripting.FileSystemObject\") \r\nIf Not Fso.FileExists(Server.MapPath(FileName)) Then \r\nCreateFile(\"Iplist.txt\") \r\nExit Function \r\nEnd If \r\n\r\nSet ts = Fso.OpenTextFile(Server.MapPath(FileName)) \r\nIplist = ts.ReadAll \r\nts.Close \r\nSet ts = Nothing \r\nSet Fso = Nothing \r\nReadIpList = Iplist \r\nEnd Function \r\n\r\n'\u521b\u5efa\u6587\u4ef6\u51fd\u6570 \r\nFunction CreateFile(FileName) \r\nSet Fso = Server.CreateObject(\"Scripting.FileSystemObject\") \r\nSet Cfs = Fso.CreateTextFile(Server.MapPath(FileName)) \r\nCfs.Close \r\nSet Cfs = Nothing \r\nSet Fso = Nothing \r\nEnd Function \r\n\r\n'\u5173\u95ed\u5f53\u524dIE\u7a97\u53e3\u51fd\u6570(\u6ce8:IE6\u4e0b\u901a\u8fc7,\u5176\u4ed6\u6d4f\u89c8\u5668\u672a\u6d4b\u8bd5) \r\nFunction CloseWindow() \r\n'Response.Write \"&lt;script&gt;window.location='javascript:window.opener=null;window.close();'&lt;\/script&gt;\" \r\nResponse.Redirect \"https:\/\/www.baidu.com\" \r\nEnd Function \r\n\r\nIp = Request.ServerVariables(\"REMOTE_ADDR\") '\u83b7\u53d6\u6d4f\u89c8\u8005IP\u5730\u5740 \r\n\r\nCookie = Request.Cookies(\"IsBrow\") '\u83b7\u53d6\u5f53\u524dCookies \r\n'Response.Write Cookie \r\n\r\nIf Request.ServerVariables(\"HTTP_X_FORWARDED_FOR\") &lt;&gt; \"\" Then \r\nResponse.Write \"\u672c\u7ad9\u4e0d\u5141\u8bb8\u4f7f\u7528\u4ee3\u7406\u8bbf\u95ee\" \r\nResponse.End() \r\nElse \r\nIf Cookie = \"Brow\" Then \r\nCloseWindow() \r\nElse \r\nIf Instr(ReadIpList(\"Iplist.txt\"),Ip) &lt;&gt; 0 Then \r\nCloseWindow() \r\nElse \r\nWriteIp \"Iplist.txt\" , Ip \r\nEnd If \r\nSetCookie() \r\nEnd If \r\nEnd If \r\n%&gt;\r\n<\/pre>\n<\/div>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5206\u4eab\u7ed9\u5927\u5bb6\u7684asp\u5b9e\u73b0\u4ee3\u7801\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u5b66\u4e60\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9650\u5236\u4e00\u4e2aip\u53ea\u80fd\u8bbf\u95ee\u4e00\u6b21\uff0c\u73b0\u5728\u5c06asp\u4ee3\u7801\u5206\u4eab\u7ed9\u5927\u5bb6\uff1a &lt;% &#8216;\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ &#8230; <a title=\"asp\u5b9e\u73b0\u9650\u5236\u4e00\u4e2aip\u53ea\u80fd\u8bbf\u95ee\u4e00\u6b21\u7684\u65b9\u6cd5\" class=\"read-more\" href=\"https:\/\/cn.hostease.com\/xueyuan\/jishu\/asp%e5%ae%9e%e7%8e%b0%e9%99%90%e5%88%b6%e4%b8%80%e4%b8%aaip%e5%8f%aa%e8%83%bd%e8%ae%bf%e9%97%ae%e4%b8%80%e6%ac%a1%e7%9a%84%e6%96%b9%e6%b3%95\/\" aria-label=\"\u9605\u8bfb asp\u5b9e\u73b0\u9650\u5236\u4e00\u4e2aip\u53ea\u80fd\u8bbf\u95ee\u4e00\u6b21\u7684\u65b9\u6cd5\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7,5],"tags":[],"class_list":["post-3279","post","type-post","status-publish","format-standard","hentry","category-asp","category-jishu"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/3279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/comments?post=3279"}],"version-history":[{"count":1,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/3279\/revisions"}],"predecessor-version":[{"id":3280,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/3279\/revisions\/3280"}],"wp:attachment":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/media?parent=3279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/categories?post=3279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/tags?post=3279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}