Error : MSXML2.XMLHTTP.3.0
Hi friends,
I am facing an issue with the following code
Code:
Function GetURL(str_URL)
Set obj_XMLHTTP = Server.CreateObject ("MSXML2.ServerXMLHTTP.3.0")
obj_XMLHTTP.Open "GET", str_URL, False, "", ""
obj_XMLHTTP.Send
GetURL = obj_XMLHTTP.ResponseText
Set obj_XMLHTTP = Nothing
End Function
I want to have a remote proxy server to make it possible.Can anyone help me out with this issue.
Re: Error : MSXML2.XMLHTTP.3.0
Try to use MSXML2.ServerXMLHTTP.3.0, XMLHTTP should not be used the server context.
Re: Error : MSXML2.XMLHTTP.3.0
Try to use the following code i am sure it will work for you.
Code:
Set objXML = Server.CreateObject("WinHTTP.WinHTTPRequest.5.1")
objXML.SetProxy 2, "ip:port"
objXML.Open "GET", "url", False
objXML.setRequestHeader "Content-Type", "content=text/html; charset=iso-8859-1"
objXML.Send
Set xmlDoc = Server.CreateObject("Msxml2.DOMDocument")
xmlDoc.loadXML(objXML.responseText)