Originariamente inviato da optime
may be. fa' vedere come fai
OK:
codice:
Function getString(byVal StringBin)
dim intCount
getString =""
For intCount = 1 to LenB(StringBin)
getString = getString & chr( AscB(MidB(StringBin, intCount, 1)) )
Next
End Function
url = "http://www.paginaweb.com"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
pagetxt = "<xmp>" & CStr(xmlhttp.ResponseText) & "</xmp>"
set fileSys = Server.CreateObject("Scripting.FileSystemObject")
set textStream = fileSys.CreateTextFile(Server.MapPath("salud.txt"), True, False)
textStream.Write getString(pagetxt)
textStream.Close
Set textStream = Nothing
Set fileSys = Nothing
pagestatus = xmlhttp.Status
Set xmlhttp = Nothing
////////////////////////////////////////////////////////////
filePath = Server.Mappath("salud.txt")
RESPONSE.WRITE "MaGGico FilePath ...: " & FILEPATH & "
"
Set objFileSystem = Server.CreateObject("Scripting.FileSystemObject")
if objFileSystem.FileExists(filePath) then
Set objFile = objFileSystem.OpenTextFile(filePath, 1)
SiStampa = False
Do While Not objFile.AtEndofStream
LuisLine = objFile.ReadLine
if Instr(LuisLine, "") then SiStampa = True
if Instr(LuisLine, "") then SiStampa = False
Response.Write LuisLine & "
"
Loop
objFile.Close
Set objFile = Nothing
ELSE
RESPONSE.WRITE "IL FILE " & filePath & " NUN CE STA"
end if
Set objFileSystem = Nothing
////////////////////////////////////////////////////////////