1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Rep Power

    Automatic login to other site.

    I have done a login page and set up all the database connection. its working and no problem with it. i want to login to another site.. lets think it to be gmail.com from my site. Is it possible to login into gmail account while i am entering the login details in my site and login and gmail account too without opening gmail.com
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Rep Power
    How would you be able to login to your gmail account without first connecting to gmail.com?

    Yes it's possible to login on your site and use something like curl for example to log you into gmail at the same time as the first login
  4. #3
  5. Mad Scientist
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2007
    North Yorkshire, UK
    Rep Power
    At the crudest level, you just replicate the login form, including the form's action and method.

    However, some sites put measures in place to prevent this, as a precursor to avoiding CSRF.

    gmail, for example does such a thing.

    Taking a things on a bit you can build, or use an existing, http client in PHP to login (see snoopy, for example)....however I don't think you would then be able to transfer the session from the server to your local machine to take control.

    A more elegant and robust solution is to see if the target site has an API you can use. In the case of gmail you can use the php imap functions to build yourself your own email client
    I said I didn't like ORM!!! <?php $this->model->update($this->request->resources[0])->set($this->request->getData())->getData('count'); ?>

    PDO vs mysql_* functions: Find a Migration Guide Here

    [ Xeneco - T'interweb Development ] - [ Are you a Help Vampire? ] - [ Read The manual! ] - [ W3 methods - GET, POST, etc ] - [ Web Design Hell ]

IMN logo majestic logo threadwatch logo seochat tools logo