Hi,
I'm trying to save a web page content by using Microsoft.XMLHTTP. I can write it into a new page but I get an error when I write it in a file.Here's my code:
Response.Buffer = True
Dim objXMLHTTP, xml,strHtmlText
Dim FSO,objFile,f
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", Request.ServerVariables("HTTP_REFERER"), False
xml.Send
Response.Write xml.responseText 'It really works!!
Set FSO = Server.CreateObject("Scripting.FileSystemObject")f = "myFile.html"
Set objFile=fso.CreateTextFile(server.MapPath(f))objFile.Write(xml.responseText )'Here I get an error saying:wrong argument or wrong procedure calling
objFile.Close
Set xml = Nothing
Where's the error?
Thank you
I'm trying to save a web page content by using Microsoft.XMLHTTP. I can write it into a new page but I get an error when I write it in a file.Here's my code:
Response.Buffer = True
Dim objXMLHTTP, xml,strHtmlText
Dim FSO,objFile,f
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", Request.ServerVariables("HTTP_REFERER"), False
xml.Send
Response.Write xml.responseText 'It really works!!
Set FSO = Server.CreateObject("Scripting.FileSystemObject")f = "myFile.html"
Set objFile=fso.CreateTextFile(server.MapPath(f))objFile.Write(xml.responseText )'Here I get an error saying:wrong argument or wrong procedure calling
objFile.Close
Set xml = Nothing
Where's the error?
Thank you