Save cookies for remote web pages

后端 未结 2 1764
迷失自我
迷失自我 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:38

    Shazam - that worked ! Thx soooo much ! In case someone else stumbles upon this page, here's what was needed in detail:

    1. install cURL (for me it'was as simple as 'sudo apt-get install php5-curl' in ubuntu)
    2. change the prior-listed PHP to the following:

      
      

    Above code snippet heavily influenced by http://www.weberdev.com/get_example-4555.html.

提交回复
热议问题