Solved

How to login to member are on website through boxes on exe?

Posted on 2003-11-16
6
342 Views
Last Modified: 2010-04-05
Hello,
Is there any way I can login to a member area on a website using an exe?
I would like to have 2 boxes, username and password.
Then a users submits these and it will login to the member area in IE and open the page logged in.
If anyone knows how I can do this i would REALLY appreciate the help, I have been trying for a while but have never done anything like it before.
Thanks
John
0
Comment
Question by:Custom-Hosting
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 43 total points
ID: 9758658
Depends on the login mechanism of a website. Some sites are set up to be secure, requiring authentication. If you use the Indy components then you'll need to set user name and password in the request property and set BasicAuthentication to true. Other sites just expect the username and password to be part of the POST data that is send to the server. In that case you have to use the TidHTTP.Post method, providing username and password in a separate stream or stringlist.
It's worse if you want to log in to e.g. Yahoo because Yahoo requires client-side encryption. If you log in to Yahoo then a Java-Script in the client calculates a hash value, then sends the hashed value to the server for verification.

In other words, there is no -generic- method to log in to any site. You first have to examine the website itself to check how the login information must be send to it.
0
 

Assisted Solution

by:Smortex
Smortex earned 41 total points
ID: 9759042
Maybe you can do this like that :
1 - Take a look to the login page source in order to find the submission form :

<form method="post" action="/login.php" name="DoLogin" [...]>
  Login : <input type="edit" name="login" [...]>
  Password : <input type="edit" name="pass" [...]>
  <input type="submit">
</form>

2 - Edit this "Form". You may change the input type to "hidden", and you can of course remove all the text between the inputs. In the login and password input, add "value="%s"" Take a look to the "action" property of the form, complete it if it is not a full url (beginning with http://...). It may look like this :

<form method="post" action="http://www.mypage.com/login.php" name="DoLogin">
  <input type="hidden" name="login" value="%s">
  <input type="hidden" name="pass" value="%s">
</form>

3 - Create a form with a TEdit for the username, an other for the password, and a button.

4 - On the button's event, write a html file including :
 -> the modified html-form with the informations of your software (You can use : "Format(myForm,[LoginEdit.Text,PasswordEdit.Text]);"). This may write (in my example) :
 -> A javascript function to auto-submit the form

It may llok like this :

<html>
  <head>
    <script>
      function LogMe() {
        document.DoLogin.submit();
      }
    </script>
  </head>
  <body onLoad="LogMe();">
    <form method="post" action="http://www.mypage.com/login.php" name="DoLogin">
      <input type="hidden" name="login" value="username">
      <input type="hidden" name="pass" value="password">
    </form>
  </body>
</html>

This work quite well, bug the password is written in the file, so it is important to remove the file as soon as it is not used.

Hope that's help !

Regards
0
 
LVL 26

Assisted Solution

by:EddieShipman
EddieShipman earned 41 total points
ID: 9764797
0
 

Author Comment

by:Custom-Hosting
ID: 9796301
Hey,
Thanks to everyone that helped.
I decided to use a TWebBrowser and just navigate to a login.html page which had the login form and open it in _blank so it opened IE for the member area.
I will split to points for everyone that helped.
Thanks again,
John
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month7 days, 7 hours left to enroll

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question