|Real Software Forums
|HTTPSocket WebSite Login
|Page 1 of 1|
|Author:||sinner [ Wed Jul 06, 2011 9:47 am ]|
|Post subject:||HTTPSocket WebSite Login|
Hello i was wondering i have a vary simple code in VB6 that logs into a website. I tryed the same in RB but it does not log into the webpage. Am i doing something wrong here?
Private Sub Command1_Click()
Dim form As Dictionary
|Author:||jlawrence [ Wed Jul 06, 2011 12:30 pm ]|
|Post subject:||Re: HTTPSocket WebSite Login|
are you getting an error of some kind? I always recommend firing up wireshark and see what's going on behind the scenes in cases like this. Maybe an encoding problem or a hidden field that needs to be set.
it is standard http authentication? or a form on a page?
for standard http authentication see this discussion
otherwise for a form, your procedure seems to be correct provided you are returning all the necessary fields/cookies that the site is expecting.
one thing I do notice though that might be causing a problem, you should capture your pageheaders in the HeadersReceived event. The way you have it coded, it just flies through the "httpsocket1.post" and continues before the page is even delivered, so it probably is skipping right over your for-loop. Remember that httpsockets are asynchronous so you have to wait for results before you proceed.
|Page 1 of 1||All times are UTC - 5 hours|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group