How do I create a link on a site that will go to another site?

There is a simple site, call it http://foo.com/ with a simple user / password form that sends a post request to http://foo.com/login.php for the user's login.

How can I create a link on another site, say http://foo_autologin.com/ , that will log in with a predefined password at http://foo.com/ and open it by logging in in another tab?

0


source to share


1 answer


You can have http://foo_autologin.php

(doesn't need to have php, maybe html) use Javascript to open a new window pointing to a file called proxy_login.php or something. Then use CURL to send your login credentials to http://foo.com

. Checkout Curl Documentation and see examples.



+2


source







All Articles