Microsoft
Software
Hardware
Network
Question : How to get past login page strRequestHTML Post
I am trying to run the below in vb excel to auto login into a local intranet site to run some url post to perform some functions. However i cant seem to get past the login page (i dont have access to the web site its a packaged site and i dont know the tech people). Looking at the source code for the page it has two inputs userid and userpassword. As you can see from my code below i have tried adding the details of the user etc to the web url but it just diverts to an error page.
Does anyone have any suggestions?
Dim strRequestHTML
Set objHTMLDoc = CreateObject("HTMLFILE")
Set objXMLHTTP = CreateObject("Msxml2.XMLHT
TP.5.0")
With objXMLHTTP
strRequestHTML = "
http://mywebsite.com/logi
n.do
"
.Open "POST", strRequestHTML, False
.setRequestHeader "Content-Type", "application/x-www-form-ur
lencoded; charset=UTF-8"
.send
strRequestHTML = "
http:mywebsite.com/home.d
o
"
.Open "POST", strRequestHTML, False
.setRequestHeader "Content-Type", "application/x-www-form-ur
lencoded; charset=UTF-8"
.send
strRequestHTML = strRequestHTML & "?userid=user&userpassword
=password"
.Open "POST", strRequestHTML, False
.setRequestHeader "Content-Type", "application/x-www-form-ur
lencoded; charset=UTF-8"
.send
MsgBox .responsetext
End With
Set objHTMLDoc = Nothing
Answer : How to get past login page strRequestHTML Post
Hmm
Perhaps this one is better since it sets the content-length
http://autho
rs.aspalli
ance.com/s
tevesmith/
articles/
n
etscrape2.
asp
Random Solutions
VBscript to search subfolders and copy files
Check syntax of SQL Select statement in access vba code
Virtual Server on HYPER V assigning CPUs
Convert Stored procedure from SQL mail to Database Mail
Dell Latitude d620 - NIC doesn't work
ActiveX Combo Box
How do I configure two Cable Modems on one LAN
Advice on upgrading from OS 10.4 to Leopard or Snow Leopard
How to add images and change backcolor when select on tabpage header+vb.net 2005
How do I add a domain address to my Exchange 2007 mail server?