Save cookies for remote web pages

后端 未结 2 1782
迷失自我
迷失自我 2020-12-29 12:41

I\'ve got a PHP application which needs to grab the contents from another web page, and the web page I\'m reading needs a cookie.

I\'ve found info on how to make thi

2条回答
  •  暖寄归人
    2020-12-29 13:30

    You'd probably be better off using cURL. Use curl_setopt to set up the cookie handling options.

    If this is just a one-off thing, you could use Firefox with Live HTTP Headers to get the header, then paste it into your PHP code.

提交回复
热议问题