du131642 2010-11-17 18:17
浏览 14
已采纳

PHP - 如何编写代码登录网站? [关闭]

I would like to write a PHP script that will go to a website, enter my userid and password, and retrieve data. What PHP functions or classes can I get that will do that?

I have already tried PHP file_get_contents, which works great except it does not submit userids and passwords. Then I started looking at cURL, but was not sure if that is the best way to go.

Thank you

  • 写回答

1条回答 默认 最新

  • dtbiszu7724 2010-11-17 18:19
    关注

    EDIT: My mistake, check out cURL

    Use cURL to login to websites

    cURL Tutorial

    Getting started with cURL

    There are several articles on this subject

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?