cookies have their own superglobal:
[highlight=php]
//simplest version:
file_put_contents("log.txt", print_r($_COOKIE, true));
//more control
$cookieFile = fopen("log.txt", "wb");
if ( $cookieFile )
{
foreach($_COOKIE as $k => $v)
fwrite($cookieFile, "$k => $v\n");
}
@fclose($cookieFile);
[/highlight]
@kibbles18