如何通过PHP登录到另一个站点 [英] how to login to another site via PHP
问题描述
我想了解如何通过PHP登录到另一个网站...我不知道它的正确术语,但是基本上,我希望用户能够输入他们在我的另一个网站上的登录信息,并通过我的工具与之交互.是否有任何教程? 谢谢
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 for another website on mine, and interact with it through mine.Is there any tutorial? thanks
推荐答案
完成这项工作的方法很少(实际上,您只需要将POST数据发送到另一个站点)即可.
There are few ways to do the job (actually, you just need to send POST data to the other site).
您可以使用:
流上下文(例如: http://php.net/manual/en/function.stream-context-create.php ),
或直接使用套接字(例如: http://www.jonasjohn.de/snippets/php/post-request.htm ).
or directly with sockets (example: http://www.jonasjohn.de/snippets/php/post-request.htm).
这篇关于如何通过PHP登录到另一个站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!