I am trying to parse the response header cookies for a GET request.
For some reason, getCookies() is empty! I get a 200 Response but for some reason cannot access the cookies. I'm able to get the headers, though.
Is it possible this website is hiding its cookies? What are some ways to retrieve hidden cookies?
$request = new HTTP_Request2($url, HTTP_Request2::METHOD_GET);
$request2 = new HTTP_Request2($newUrl, HTTP_Request2::METHOD_POST);
$response = $request->send();
foreach ($response->getCookies() as $c)
{
request2->addCookies($c['name'], $c['value']);
}
Cookies are being set with Javascript via (I peeked into their JS code)
<script language="JavaScript">
document.cookie="MRHCId="+Math.round((new Date()).getTime()/1000)+"_0_3600; path=/";
</script>
How can I send this cookie along with my PHP Post request?