Greetings All,
I am writing a program in which the user enters his user name and password for a specific website in the preference file of my application.
Currently, I have a link to the home page of the website. What I would like to do is automatically have my program log the user in to the website so he/she can begin using it without having to manually log in.
Is this possible?
Thanks!
John Miller
Autofill Script For A Linked Website
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 113
- Joined: Mon Apr 30, 2007 3:33 pm
- Location: Dalton, Ohio
Depends on how the site is made. Sometimes it's just a matter of executing a "POST" command to the site in question. Othertimes, it can be more tricky; for instance I remember doing it for a site that had a timestamp imbedded in the page which you had to find and send back to log in. I can give you the stack that I made back then; but the core code was approximately this:
Code: Select all
put "http://www.ogame.fr/" into myURL
load URL myURL
put findPram(format("<frame src=\"http://"),myURL) into frontPageURL
load URL frontPageURL
put findPram("timestamp",frontPageURL) into timeStamp
--
put "login=" into postData
put fld "nickname" of cd 1 of stack "ogame" after postData
put "&" after postData
put "pass=" after postData
put fld "pwdReal" of cd 1 of stack "ogame" after postData
put "&" after postData
put "timestamp=" after postData
put timeStamp after postData
--
POST postData to thePHPurl
put it into logedPage