Results 1 to 3 of 3

Thread: Login and some more stuff

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    12

    Login and some more stuff

    Hey guys. I had a question.. im workin on this app tand it takes a users email and password and writes em to strings..

    So now heres the tricky part... how would I make it open a webpage and log in using that username and password so I can like see it go?

    anyone got some kind of reference on how to do this?
    Last edited by dancrew32; Nov 6th, 2005 at 12:35 AM.

  2. #2

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    12

    Re: Login and some more stuff

    can anyone even point me in a direction?

  3. #3
    Frenzied Member Inuyasha1782's Avatar
    Join Date
    May 2005
    Location
    California, USA
    Posts
    1,035

    Re: Login and some more stuff

    Well there are a few ways you can do that.

    First off, you can use pure winsock, or inet. Personally I use a wrappper that simplify's this whole process, and I can hand that over if you want.

    Anyways, basicly you just have to send the right stuff. Generally a login is based on a PHP doc. That document uses variables to determine whether the data entered is valid or not.

    These variables can also be set globally via the url. You just need to look at the form information. Example:

    We have the site "www.joesite.com". We want to log the user in when they press a button. First thing we need to inspect would be the login form. Here is what we find:

    Code:
    <form action='/login.phtml' method='post'>
    <input type='text' name='username'>
    <input type='text' name='pass'>
    <input type='submit' value='Log In to Joe Site!'>
    </form>
    First we need the destination, which is "/login.phtml". Now the page we found this on url was "www.joesite.com/login/form". We simply remove the last page and add the new destination so it would look like this, "www.joesite.com/login/login.phtml".

    Now we add on the variables, username and pass.

    "www.joesite.com/login/login.phtml?user=MyUser&pass=MyPass"

    Always add a ? at the end when adding variables, and a "&" when moving to a new one.

    Now that's our url that should log us in. Most of the time you can just go:

    VB Code:
    1. Inet1.OpenUrl("www.joesite.com/login/login.phtml?user=MyUser&pass=MyPass")

    but in this case we had to 'post' so it might not work, that's where pure winsock comes in and you would connect to the site then send the Http Headers for 'post', and you can probably search google for that.

    Hope that cleared some things up.
    Age - 15 ::: Level - Advanced
    If you find my post useful please ::Rate It::


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width