PDA

Click to See Complete Forum and Search --> : How can I do auto login to web page using VB?


jummai
Dec 20th, 1999, 03:09 AM
I'm using Webbrowser control in my program. Let say I wanna login to hotmail, I want my program to automatically enter login name and password then click submit button.
How can I do that in VB?

Thanks a lot in advance,
Jummai

Dec 20th, 1999, 05:00 AM
In response to your question, there are a number of different methods to use. The first thing to understand is that you cannot directly have the passwords entered, to my knowledge. However, what you can do requires a little knowledge of the InStr, and Mid functions. You can search the HTML code for the <FORM> tag. Once you have that, you can find the first and second textboxes. Then edit the value text. You can also have your program prompt for the username and password and have the program write an HTML code on the local drive that would have a submit to the cgi on the hotmail server. These are the only things I can think of, but I'm sure you'll be able to think of others

jummai
Dec 20th, 1999, 09:47 AM
Thanks rippleman. But if possible, I would prefer to do it another way. Here's the scenarion... My program stored the user name and password in the encrypted file. Then navigate to the website, once the login page comes up. My program will enter the login name and password into text box, Then click submit button automatically. This way I don't have to deal with CGI or cookies (which the site keeps changing all the time) at all. Does anyone know how to do this? TIA

Dec 21st, 1999, 04:02 AM
Exactly what my first idea was. Here's an example of what the HTML will look like:
<FORM METHOD=POST ACTION="www.hotmail.com">
<INPUT NAME="Username" TYPE="TEXT" COLS="7" SIZE="15" VALUE="myusername">
</FORM>

see, the value is the username. i really dont know how you'd make the submit button automatically push, but that's how you'd make the text boxes get assigned.