用ASP XMLHTTP, 在你发送数据去目标服务器后,同时接受从它哪里传回的数据.
下面的代码就是一个很简单的例子,我们利用xmlhttp技术,把http://www.codetoad.com/站点首页的代码以xml的形式完全获取,并且在页面中输出。
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", "http://www.codetoad.com/", False
' Pull the data from the web page
xml.Send
Response.write "Here's the html we now have in our xml object"
Response.write "
"
Response.Write "
Response.Write xml.responseText
Response.Write "
Response.write "
"
Response.write " Now here's how the page looks:
"
Response.Write xml.responseText
Set xml = Nothing
%>