Example Code:
<%
dim XMLHTTP
dim URL
URL=request("url")
URL = URL 'the url that you want to pull html from
'create the xmlhttp object
Set XMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
On Error Resume Next
'use the open command to get the url... post
XMLHTTP.Open "post", URL, false
XMLHTTP.Send
If Err.Number = 0 Then ' no error occurred
'TO GET HEADERS
HDserver=xmlhttp.getResponseHeader("Server")
HDs=XMLHTTP.getAllResponseHeaders
response.write HDs
response.write "<p>"
response.write HDserver
Set XMLHTTP = Nothing
Else
retStr = "Url not found" 'error message
response.write retstr
Set XMLHTTP = Nothing
End If
%>
|