【发布时间】:2014-08-26 11:56:31
【问题描述】:
我正在使用php curl远程查看这个网页http://agentnet.propertyguru.com.sg/ex_login?w=1&redirect=/ex_home
页面重定向到另一个页面 /distil_identify_cookie.html?uid=... 在重定向回初始登录页面之前
我在 curl 脚本中设置了以下内容
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, FALSE);
这并没有阻止页面重定向。
谁能告诉我如何在页面重定向之前将这个 $_GET 变量“uid”存储在 cookie 中?
添加:
执行 curl 语句 ($response = curl_exec($ch);) 后,$response 如下
HTTP/1.1 200 OK Server: nginx Date: Sun, 06 Jul 2014 08:47:32 GMT Content-Type: text/html
Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 19 Nov 1981 08:52:00 GMT Pragma: no-cache
Set-Cookie: PHPSESSID2=94l8r0sainetrrc3vl0r7dl2f4; path=/; domain=.propertyguru.com.sg
Set-Cookie: __PAGE_REFERRER=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=agentnet.propertyguru.com.sg
Set-Cookie: __PAGE_SITE_REFERRER=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=agentnet.propertyguru.com.sg
Vary: Accept-Encoding X-Distil-CS: MISS
我在标题中找不到任何说明 uid 值的内容...
【问题讨论】: