Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


CreateObject("Microsoft.XMLHTTP")

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,53045
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> CreateObject("Microsoft.XMLHTTP")
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 CreateObject("Microsoft.XMLHTTP") - 10/25/2007 5:39:27 AM   
  jbb9665

 

Posts: 11
Score: 0
Joined: 7/14/2006
Status: offline
How does one use CreateObject("Microsoft.XMLHTTP") to log in to a web site that requires credentials, move to a particular web page at the site and pull back the contents of the page?

Thank you.
 
 
Post #: 1
 
 RE: CreateObject("Microsoft.XMLHTTP") - 10/25/2007 5:50:28 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
Have you done any searching for sample code? Have you looked at the documentation for the Microsoft.XMLHTTP object?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to jbb9665)
 
 
Post #: 2
 
 RE: CreateObject("Microsoft.XMLHTTP") - 10/25/2007 5:58:20 AM   
  DiGiTAL.SkReAM


Posts: 1194
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
quote:

ORIGINAL: jbb9665

How does one use CreateObject("Microsoft.XMLHTTP") to log in to a web site that requires credentials, move to a particular web page at the site and pull back the contents of the page?

Thank you.


Very carefully.

You're welcome.

_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to jbb9665)
 
 
Post #: 3
 
 RE: CreateObject("Microsoft.XMLHTTP") - 10/25/2007 5:59:57 AM   
  jbb9665

 

Posts: 11
Score: 0
Joined: 7/14/2006
Status: offline
Well, I have seen some code like this
Set xml = CreateObject("Microsoft.XMLHTTP")
xml.Open "POST", <URL>, False
xml.Send
response = xml.responseText

But I do not know how to "xml.send" ,i.e, "Post" the login credentials.

(in reply to jbb9665)
 
 
Post #: 4
 
 RE: CreateObject("Microsoft.XMLHTTP") - 10/25/2007 6:17:45 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
So you have answered my first question. Now answer the second.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to jbb9665)
 
 
Post #: 5
 
 RE: CreateObject("Microsoft.XMLHTTP") - 10/25/2007 5:29:16 PM   
  jbb9665

 

Posts: 11
Score: 0
Joined: 7/14/2006
Status: offline
Well. I have looked at it and what some others have said about it but don't fully understand it. That's why I have come to this forum - for help.

I guess I need to do an xml.send of the credentials in tems of the input the login page expects so something like

xml.send name=EMAILADDR value="email address" & name=PASSWORD value="password"

but I haven't had any luck with this.

So does this satisfy answering your other question?

(in reply to ebgreen)
 
 
Post #: 6
 
 RE: CreateObject("Microsoft.XMLHTTP") - 10/27/2007 7:52:22 PM   
  DiGiTAL.SkReAM


Posts: 1194
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
This was the first response I got when I googled "vbscript xmlhttp":
http://www.paulsadowski.com/WSH/xmlhttp.htm


_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to jbb9665)
 
 
Post #: 7
 
 RE: CreateObject("Microsoft.XMLHTTP") - 10/27/2007 9:58:45 PM   
  ehvbs

 

Posts: 2223
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Hi jbb9665,

have a look at

  http://www.4guysfromrolla.com/webtech/110100-1.shtml
  http://www.4guysfromrolla.com/webtech/110100-1.2.shtml

and

  http://msdn2.microsoft.com/en-us/library/ms753790.aspx

Good luck!

ehvbs

(in reply to DiGiTAL.SkReAM)
 
 
Post #: 8
 
 RE: CreateObject("Microsoft.XMLHTTP") - 10/2/2008 10:53:04 AM   
  Roshan2008

 

Posts: 2
Score: 0
Joined: 10/1/2008
Status: offline
Hi, I am trying to achive the samething.. I have post my question here.. http://www.visualbasicscript.com/m_64707/tm.htm

To login to a website use the following

xml.Open "GET", "http://test", False,"USERID","PASSW0RD"
xml.Send

To select a Link on the site which will transfer you to that page, simplay access that link

xml.Open "GET", "http://test/private/login.ssi?WEBINDEX=3&JUNK=1", False,"USERID","PASSW0RD"
xml.Send

What I am stuck is on Sumbiting a form..

This just errors

xml.Open "POST", "http://test/private/login.ssi?WEBINDEX=3&JUNK=1", False
xml.Send "loginid=USERIDTEST&pw=PASSW0RD&confirmpw=PASSW0RD"

(in reply to ehvbs)
 
 
Post #: 9
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> CreateObject("Microsoft.XMLHTTP") Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts