Questo è il codice che uso :
<%
Response.Buffer = True
Dim objXMLHTTP, xml
'Set xml = Server.CreateObject("Microsoft.XMLHTTP")
' Or, for version 3.0 of XMLHTTP, use:
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
xml.Open "GET", "http://www.www.it/admin/anagrafica.asp?richiesta=lista", False,
xml.Send
strHtml = xml.responseText
Set FSO = CreateObject("Scripting.FileSystemObject")
sPath = Server.MapPath("/download/prova2.txt")
Set f = FSO.CreateTextFile(sPath, True)
f.WriteLine(strHtml)
f.Close
Set f = Nothing
Set FSO = Nothing
set xml = Nothing
%>
Ora il problema è nello scrivere questi stramaledetti dati!
Infatti se provo a leggere l'home page del sito (?) la stringa
strHtml si popola correttamente e quindi il file prova2.txt viene creato regolarmente... invece se provo a richiamare qualsiasi altra pagina dall'interno del mio sito, la stringa strHtml sembra popolarsi ma appena il codice prova a scrivere il file viene generato un messaggio di errore nella riga writeLine(strHtml).
In pratica, ho controllato, la stringa risulta vuota!!!
AIUTO, please... sto impazzendo.