Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


need help with xmlhttp

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> need help with 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 >>
 need help with xmlhttp - 8/7/2003 10:30:11 AM   
  qin

 

Posts: 3
Score: 0
Joined: 8/7/2003
From:
Status: offline
Can anyone tell me what is wrong with the following code? I can't seem to get pass the login page even though
I have provided with the username and the password with send method. everytime i run the script i am getting the login page as
response.




 
 
Post #: 1
 
 Re: need help with xmlhttp - 8/7/2003 10:31:23 AM   
  qin

 

Posts: 3
Score: 0
Joined: 8/7/2003
From:
Status: offline
sorry the code is here:






(in reply to qin)
 
 
Post #: 2
 
 Re: need help with xmlhttp - 8/7/2003 10:32:54 AM   
  qin

 

Posts: 3
Score: 0
Joined: 8/7/2003
From:
Status: offline
sorry, first timer, don't know how to post source code.

strPath = "http://localhost/myDir/"
strPage = "login.aspx"
strRequest = "username=admin&password=admin"

set objHTTP = CreateObject("Microsoft.XMLHTTP")

With objHTTP
.open "POST", strPath & strPage, False
.send strRequest
strCookie = .getResponseHeader("Set-Cookie")
temp = .responseText
WScript.echo(temp)
End With

Set objHTTP = Nothing

strPage = "Home.aspx"

set objHTTP = CreateObject("Microsoft.XMLHTTP")

With objHTTP
.open "GET", strPath & strPage, False
.setRequestHeader "Cookie", strCookie
.send

temp2 = .responseText
WScript.echo(temp2)
End With

Set objHTTP = Nothing

(in reply to qin)
 
 
Post #: 3
 
 
 
  

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 >> need help with 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