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
%>
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
%>
相关文章推荐
- How to get the HTML source of a webpage in Ruby
- How To Retrieve the URL of a Web Page from an ActiveX Control
- How to Fix “HTTP Error 403.14 – Forbidden The Web server is configured to not list the contents of this directory”
- The Web server is configured to not list the contents of this directory.
- How to get the url of a page in OpenERP?
- (C#) A demo on how to auto fill out the "account" value in log in web page in "WebBrowser" control.
- Please read "Security" section of the manual to find out how to run mysqld as root!错误解决
- How to copy the contents of std::vector to c-style static array,safely?
- How to Customize the Left Navigation Bar of SPPS Home Page
- How to begin with the webpage making
- web程序部署到Tomcat服务器报错Deployment is out ofdate due to changes in the underlying project contents...
- How do you copy the contents of an array to a std::vector in C++ without looping? (From stack over flow)
- How to save content/text of a web page by forcing save-as option
- Please read "Security" section of the manual to find out how to run mysqld as root!错误解决
- Please read "Security" section of the manual to find out how to run mysqld as root!错误解决
- IIS 7 The Web server is configured to not list the contents of this directory
- How to Customize the Left Navigation Bar of SPPS Home Page [Another Solution]
- How-to increase the default timeout value of vSphere Web Client
- How to make a statistics by the mode of Excel+Web Services
- How to read the query string params of a ASP.NET raw URL?