我正在发出 cURL 请求exampleA.com以获取其响应标头。到目前为止一切顺利,这些是我得到的一些数据:
Array
(
[0] => sess=1; path=/; expires=Wed, 15-May-2013 09:25:29 GMT; domain=.exampleA.com; HttpOnly
[1] => .........
)
现在这对我来说是困难的部分,我想将 cookie 设置为我自己的 domain exampleB.com,就像我从中获取它一样exampleA.com。
使用 Firebug,这是 Response Header 在exampleA.com:
Set-Cookie:uuid2=4511997856767122744; path=/; expires=Mon, 12-Aug-2013 09:21:38 GMT; domain=.exampleA.com; HttpOnly
所以我需要将 cookie 设置为相同的值,但在exampleB.com. 我怎么做?