Re: Download a webpage req' authentication
- From: "news.iinet.net.au" <gk2005@xxxxxxxxxxxx>
- Date: Sun, 26 Nov 2006 16:51:28 +1000
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.
.
- References:
- Download a webpage req' authentication
- From: news.iinet.net.au
- Download a webpage req' authentication
- Prev by Date: Re: What editor to use, and how to organize snippets
- Next by Date: Re: Download a webpage req' authentication
- Previous by thread: Download a webpage req' authentication
- Next by thread: Re: Download a webpage req' authentication
- Index(es):