goal: log into the web page and save the html to a file for parsing later.
the html on the page is just a list of users and when they logged in and off.
When yo
I'd suggest to use something like Fiddler to identify the request that does the actual login, and then use that information in an XMLHttpRequest.
url = "..."
filename = "..."
Set req = CreateObject("MSXML2.XMLHTTP.6.0")
req.open "POST", url, False
req.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
req.send "field1=foo&field2=bar&..."
Set fso = CreateObject("Scripting.FileSystemObject")
fso.OpenTextFile(filename, 2, True).WriteLine req.responseText
If the response is UTF-8 encoded you may need to use an ADODB.Stream object for saving the content.
Set stream = CreateObject("ADODB.Stream")
stream.Open
stream.Type = 2 'text
stream.Position = 0
stream.Charset = "utf-8"
stream.WriteText req.responseText
stream.SaveToFile filename, 2
stream.Close