Search code examples
phpformscurllinkshare

How to log in website (like linkshare) using php curl?


the login page is here

https://login.linkshare.com/sso/login

can anyone tell me how to log in this website using php curl.

something special about this website is that the form on the above page has a action url which is a relative path.

Thank you very much!


Solution

  • It is quite simple, almost everything you'll need you can find in here.

    Just pay attention to the 2 hidden fields that you need to retrieve first and then append to your request: lt and execution. There are more hidden fields but their values don't change.