Re: Download a webpage req' authentication



Argh never mind, just found it. Always the way lol.

Thanks anyway.
Incase anyone else was after it:

======code start
Dim objXMLHTTP,HTML
UserName="admin"
Password="admin"
Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
On Error Resume Next
objXMLHTTP.Open "GET", "http://192.168.1.254/status.html";, False, username,
Password
objXMLHTTP.Send
if err = 0 then
HTML = objXMLHTTP.responseBody
Set objRS = CreateObject("ADODB.Recordset")
objRS.Fields.Append "txt", 200, 35000, &H00000080
objRS.Open
objRS.AddNew
objRS.Fields("txt").AppendChunk HTML
ReturnHTML = objRS("txt").Value
objRS.Close
Set objRS = Nothing
else
ReturnHTML = "Network error"
end if
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.CreateTextFile("status.html",true)
f.write(ReturnHTML)
f.close
======code end


"news.iinet.net.au" <gk2005@xxxxxxxxxxxx> wrote in message
news:456934b5$0$24717$5a62ac22@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi. I was trying to find an old script I had that downloaded a web page
(html) that requires authentication (username and password) but couldn't
find it. I was wondering if someone could please provide me a little
script example? Would appreciate it greatly.

Thanks.



.