您的位置:首页 > 其它

How to read the contents of a remote web page

2010-01-21 10:07 651 查看
<%
url = "http://www.remotesite.com/out.asp"

' add a BASE HREF tag for remote page which has relative image URLs, or style sheets, or JavaScript files, or frames, or links
Response.Write "<base href='" & url & "' />"

Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "GET", url, false
xmlhttp.Send ""
Response.Write xmlhttp.ResponseText
Set xmlhttp = Nothing
%>

<%
url = "http://www.remotesite.com/out.asp"
Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST", url, false
xmlhttp.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.Send "x=1&y=2"
Response.Write xmlhttp.ResponseText
Set xmlhttp = Nothing
%>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐