2
我创建第三方的cookie <img src="http://example.com/test.php" />
第三方cookie的 - 从其他域
test.php的阅读:
if($_GET['r']) {
header('Content-type: image/gif');
// echo transparent 1x1 pixel
exit;
} else {
setcookie('name', md5(time()), time()+60*60*24*30, '/');
$url = 'http://example.com/test.php?r=1';
header('Location: '.$url);
exit;
}
此代码创建第三方的Cookie。是否有任何方法通过JavaScript从不同于example.com的域中读取创建的cookie?