nickgross19
asked on
ASP: MSXML2.ServerXMLHTTP object question
I am using classic ASP and I am trying to pull the HTML from a URL with the following code:
When I try to out put pageContents in a response.Write(pageContent s) i get the following error:
Microsoft VBScript runtime error '800a01a8'
Object required: ''
I upload the code to a different domain and when I execute it, the code successfully pulls the HTML from the url i provide, but when I upload the code to this problem website, it does not work.
url = "URL GOES HERE"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "POST", url, false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send "COMPANY="& request.form("company")
pageContents = xmlhttp.responseText
document.write(pageContents)
When I try to out put pageContents in a response.Write(pageContent
Microsoft VBScript runtime error '800a01a8'
Object required: ''
I upload the code to a different domain and when I execute it, the code successfully pulls the HTML from the url i provide, but when I upload the code to this problem website, it does not work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.