PHP curl,保留会话

I'm making an app that scrapes data off a site, formats it as needed, and displays it to the user. Now, the site doesn't allow cross-site script requests, so I'm using PHP's curl to retrieve the page.

  • With a browser, the site gives you a cookie when you first visit, asking you to log in, and on subsequent requests will give you the actual page you requested.

  • With PHP's curl, the site will just give me the page asking me to log in. And, I presume, give my PHP server a cookie.

How can I save this cookie and present it on subsequent requests?

查看全部
dongwen3437
dongwen3437
2012/02/08 04:47
  • curl
  • session
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

3个回复