Msxml2.ServerXMLHTTP

B

bo0oost

I'm trying to pull back a page that is dynamic. The dyanmic data has a
apostrophe in it. Everytime I pull it back, the data changes th
apostrophe to a question mark.

Any ideas?

here is my code:

Set OBjSocket = CreateObject("Msxml2.ServerXMLHTTP")
'On Error Resume Next

'*** REQUEST PAGE FROM SERVER
WScript.Echo "GET " & url
OBjSocket.Open "GET", url , false
OBjSocket.setRequestHeader "Content-Type"
"application/x-www-form-urlencoded"

OBjSocket.Send
xBuffer = OBjSocket.responseText
Set OBjSocket = Nothing

'*** DELETE FILE IF ALREADY EXISTS
if OBjFs.FileExists(savepath) then
OBjFs.DeleteFile(savepath)
end if

'*** CREATE AND SAVE PAGE TO DISK
OBjFs.CreateTextFile savepath
Set OBjF = OBjFs.GetFile(savepath)
Set OBjTxt = OBjF.OpenAsTextStream(2, -1)
OBjTxt.Write ParsePage(xBuffer)
OBjTxt.Close

Set OBjF = Nothing
Set OBjTxt = Nothing

Any ideas


-
bo0oos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top