我正在尝试使用 php 和 curl 登录网站。我可以登录并设置 cookie,但是我需要向链接发出 GET 请求,并且标题应该如下所示。取自 HTTPLIVEHEADERS (FF)。
标题:
http://www.home.com/iframe/fut/p/ut/shards?_=1380785844876
GET /iframe/fut/p/ut/shards?_=1380785844876 HTTP/1.1
Host: www.home.com
User-Agent: Mozilla/5.0 (Windows NT 6.3; rv:24.0) Gecko/20100101 Firefox/24.0
Accept: application/json, text/javascript;
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json
Session-Data-Nucleus-Id: 211222911
X-UT-Embed-Error: true
X-UT-Route: https://host2.com
X-Requested-With: XMLHttpRequest
Referer: http://www.home.com/iframe/fut/
Cookie: futweb=vk9b5ersdt0sbksooc7p8cj9k7; WEB-SESSION=vev11q6co9nlko4raeisfiqtu5; hl=us; XSRF-TOKEN=5372d286aa1353e79c68b3d177192e5af7f96fc4; device_view=not_mobile; s_sivo=US%3AEASFW%3AFUT; s_cc=true; s_ria=flash%20not%20detected%7Csilverlight%20not%20detected; s_pv=NA%3AUS%3ASPORTS%3AEAC%3AONLINEGAME%3AFIFA%3AEASFW%3AFUT%3ALANDINGPAGE; s_nr1=1380785843058-NEW; s_sq=%5B%5BB%5D%5D; utag_main=_st:1380787644943$ses_id:1380786810666%3Bexp-session; s_ppv=100
Connection: keep-alive