p3p头实现跨域设置cookie

假设在A站点某一个页面下

<script src="http://B.com/setcookie.php"></script>

setcookie.php

<?php

set_cookie('BCOOOKIE','110');

?>

在IE下是无法设置成功的,必须加入

[php]header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');[/php]

<?php

header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');

set_cookie('BCOOOKIE','110');

?>