how to login to another site via PHP

后端 未结 3 1494
无人及你
无人及你 2020-12-28 09:01

I wanted to find out how to login to another site via PHP... I don\'t know the proper term for it, but basically, I want a user to be able to enter their login information f

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-28 09:27

    There are few ways to do the job (actually, you just need to send POST data to the other site).

    You can use :

    • curl (example: http://davidwalsh.name/execute-http-post-php-curl),

    • stream context (example: http://php.net/manual/en/function.stream-context-create.php),

    • or directly with sockets (example: http://www.jonasjohn.de/snippets/php/post-request.htm).

提交回复
热议问题