{"id":28,"date":"2007-08-21T15:11:28","date_gmt":"2007-08-21T07:11:28","guid":{"rendered":"http:\/\/www.cnmiss.cn\/?p=27"},"modified":"2010-12-02T06:32:07","modified_gmt":"2010-12-02T06:32:07","slug":"%e5%b0%8f%e5%81%b7%e7%a8%8b%e5%ba%8f%e5%8e%9f%e7%90%86%e5%92%8c%e7%ae%80%e5%8d%95%e7%a4%ba%e4%be%8b","status":"publish","type":"post","link":"https:\/\/www.cnmiss.cn\/?p=28","title":{"rendered":"\u5c0f\u5077\u7a0b\u5e8f\u539f\u7406\u548c\u7b80\u5355\u793a\u4f8b"},"content":{"rendered":"<p>\u73b0\u5728\u7f51\u4e0a\u6d41\u884c\u7684\u5c0f\u5077\u7a0b\u5e8f\u6bd4\u8f83\u591a\uff0c\u6709\u65b0\u95fb\u7c7b\u5c0f\u5077\uff0c\u97f3\u4e50\u5c0f\u5077\uff0c\u4e0b\u8f7d\u5c0f\u5077\uff0c\u90a3\u4e48\u5b83\u4eec\u662f\u5982\u4f55\u505a\u7684\u5462\uff0c\u4e0b\u9762\u6211\u6765\u505a\u4e2a\u7b80\u5355\u4ecb\u7ecd\uff0c\u5e0c\u671b\u5bf9\u5404\u4f4d\u7ad9\u957f\u6709\u6240\u5e2e\u52a9\u3002<br \/>\uff08\u4e00\uff09\u539f\u7406<br \/>\u5c0f\u5077\u7a0b\u5e8f\u5b9e\u9645\u4e0a\u662f\u901a\u8fc7\u4e86XML\u4e2d\u7684XMLHTTP\u7ec4\u4ef6\u8c03\u7528\u5176\u5b83\u7f51\u7ad9\u4e0a\u7684\u7f51\u9875\u3002\u6bd4\u5982\u65b0\u95fb\u5c0f\u5077\u7a0b\u5e8f\uff0c\u5f88\u591a\u90fd\u662f\u8c03\u7528\u4e86sina\u7684\u65b0\u95fb\u7f51\u9875\uff0c\u5e76\u4e14\u5bf9\u5176\u4e2d\u7684html\u8fdb\u884c\u4e86\u4e00\u4e9b\u66ff\u6362\uff0c\u540c\u65f6\u5bf9\u5e7f\u544a\u4e5f\u8fdb\u884c\u4e86\u8fc7\u6ee4\u3002\u7528\u5c0f\u5077\u7a0b\u5e8f\u7684\u4f18\u70b9\u6709\uff1a\u65e0\u987b\u7ef4\u62a4\u7f51\u7ad9\uff0c\u56e0\u4e3a\u5c0f\u5077\u7a0b\u5e8f\u4e2d\u7684\u6570\u636e\u6765\u81ea\u5176\u4ed6\u7f51\u7ad9\uff0c\u5b83\u5c06\u968f\u7740\u8be5\u7f51\u7ad9\u7684\u66f4\u65b0\u800c\u66f4\u65b0\uff1b\u53ef\u4ee5\u8282\u7701\u670d\u52a1\u5668\u8d44\u6e90\uff0c\u4e00\u822c\u5c0f\u5077\u7a0b\u5e8f\u5c31\u51e0\u4e2a\u6587\u4ef6\uff0c\u6240\u6709\u7f51\u9875\u5185\u5bb9\u90fd\u662f\u6765\u81ea\u5176\u4ed6\u7f51\u7ad9\u3002\u7f3a\u70b9\u6709\uff1a\u4e0d\u7a33\u5b9a\uff0c\u5982\u679c\u76ee\u6807\u7f51\u7ad9\u51fa\u9519\uff0c\u7a0b\u5e8f\u4e5f\u4f1a\u51fa\u9519\uff0c\u800c\u4e14\uff0c\u5982\u679c\u76ee\u6807\u7f51\u7ad9\u8fdb\u884c\u5347\u7ea7\u7ef4\u62a4\uff0c\u90a3\u4e48\u5c0f\u5077\u7a0b\u5e8f\u4e5f\u8981\u8fdb\u884c\u76f8\u5e94\u4fee\u6539\uff1b\u901f\u5ea6\uff0c\u56e0\u4e3a\u662f\u8fdc\u7a0b\u8c03\u7528\uff0c\u901f\u5ea6\u548c\u5728\u672c\u5730\u670d\u52a1\u5668\u4e0a\u8bfb\u53d6\u6570\u636e\u6bd4\u8d77\u6765\uff0c\u80af\u5b9a\u8981\u6162\u4e00\u4e9b\u3002 <\/p>\n<p>\uff08\u4e8c\uff09\u4e8b\u4f8b<\/p>\n<p>\u4e0b\u9762\u5c31XMLHTTP\u5728ASP\u4e2d\u7684\u5e94\u7528\u505a\u4e2a\u7b80\u5355\u8bf4\u660e<\/p>\n<blockquote><p>&lt;%<br \/>&#39;\u5e38\u7528\u51fd\u6570<\/p>\n<p>&#39;1\u3001\u8f93\u5165url\u76ee\u6807\u7f51\u9875\u5730\u5740\uff0c\u8fd4\u56de\u503cgetHTTPPage\u662f\u76ee\u6807\u7f51\u9875\u7684html\u4ee3\u7801<br \/>function getHTTPPage(url)<br \/>    dim Http<br \/>    set Http=server.createobject(&quot;MSXML2.XMLHTTP&quot;)<br \/>    Http.open &quot;GET&quot;,url,false<br \/>    Http.send()<br \/>    if Http.readystate&lt;&gt;4 then <br \/>        exit function<br \/>    end if<br \/>    getHTTPPage=bytesToBSTR(Http.responseBody,&quot;GB2312&quot;)<br \/>    set http=nothing<br \/>    if err.number&lt;&gt;0 then err.Clear <br \/>end function<\/p>\n<p>&#39;2\u3001\u8f6c\u6362\u4e71\u739b\uff0c\u76f4\u63a5\u7528xmlhttp\u8c03\u7528\u6709\u4e2d\u6587\u5b57\u7b26\u7684\u7f51\u9875\u5f97\u5230\u7684\u5c06\u662f\u4e71\u739b\uff0c\u53ef\u4ee5\u901a\u8fc7adodb.stream\u7ec4\u4ef6\u8fdb\u884c\u8f6c\u6362<br \/>Function BytesToBstr(body,Cset)<br \/>        dim objstream<br \/>        set objstream = Server.CreateObject(&quot;adodb.stream&quot;)<br \/>        objstream.Type = 1<br \/>        objstream.Mode =3<br \/>        objstream.Open<br \/>        objstream.Write body<br \/>        objstream.Position = 0<br \/>        objstream.Type = 2<br \/>        objstream.Charset = Cset<br \/>        BytesToBstr = objstream.ReadText <br \/>        objstream.Close<br \/>        set objstream = nothing<br \/>End Function<\/p>\n<p>&#39;\u4e0b\u9762\u8bd5\u7740\u8c03\u7528http&#58;\/\/www.3doing.com\/earticle\/\u7684html\u5185\u5bb9<br \/>Dim Url,Html<br \/>Url=&quot;http&#58;\/\/www.3doing.com\/earticle\/&quot;<br \/>Html = getHTTPPage(Url)<br \/>Response.write Html<br \/>%&gt;<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u73b0\u5728\u7f51\u4e0a\u6d41\u884c\u7684\u5c0f\u5077\u7a0b\u5e8f\u6bd4\u8f83\u591a\uff0c\u6709\u65b0\u95fb\u7c7b\u5c0f\u5077\uff0c\u97f3\u4e50\u5c0f\u5077\uff0c\u4e0b\u8f7d\u5c0f\u5077\uff0c\u90a3\u4e48\u5b83\u4eec\u662f\u5982\u4f55\u505a &hellip; <a href=\"https:\/\/www.cnmiss.cn\/?p=28\">\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-28","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\/28","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=28"}],"version-history":[{"count":0,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts\/28\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}