Link to home
Start Free TrialLog in
Avatar of hartnessjr
hartnessjr

asked on

Entering username and password via the net

I am in need of creating a script to enter information onto a webpage and pass it with a <enter>.

Let us use hotmail for an example.

I need to go to http://www.hotmail.com
Then enter a hardcoded username and password into the fields on that page
Hit <enter> to log in
so that i can check the mail

Obviously this is a very simple example of which i will make a lot more complicated but i  have no idea how to assign a username and a password that is hardcoded in a script to assign themselves into the appropriate fields then pass the data.

Any help would be appreciated lets just use hotmail as an example i think it would be the easiest or even experts-exchange .. anything with a username and password field.
Avatar of Paul Maker
Paul Maker
Flag of United Kingdom of Great Britain and Northern Ireland image

errr - do you mean javascript... in this case you can use the following ..

document.formname.inputname.value = 'username';

if you mean on the server then you can set the VALUE attribute in the input tag
Avatar of hartnessjr
hartnessjr

ASKER

javascript is fine.. what it is for is a monitor really so that i can set at my desk and run a script that will go to one of our webpages and log into it and then log out just so i know the webpage is up and working.
OIC - this is far more complex then, you need to write a web client that posts data to the forms... you could either write a console application using something like .NET, Perl or any language that has reusable internet libraries or automate IE using COM.
as far as your example of jscript that you said document.formname.inputname.value = 'username';

im assuming that its the same for password such as document.formname.inputname.value = 'password';

if so then will this not allow me to enter into our site if i used something such as this.. could you expand on this line of code some.
ASKER CERTIFIED SOLUTION
Avatar of Paul Maker
Paul Maker
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You could write a program in a language like .NET that supports HTTP POSTS, then read back the page to see if it is functioning.  You could even extend this kind of program to run as a service and make it email or page you when things are funky.
u can use internet explorers save password option to do that....

goto tools->internet options->content tab->auto complete-> enable the username and password checkbox


and enter the username & password for a site once,... after that it won't ask u ....

it works for many websites.. some sites won't allow this feature....

if u want to work for all the sites,,, u have to use the methods specified by the above experts

regards

Rajesh