Does anyone know what the code snippet below means?

header('P3P: CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"'); 

I've never seen such headlines, what is it for?

+7
php p3p
source share
4 answers

Take a look at this site for translating commands:

http://www.p3pwriter.com/LRN_111.asp

+5
source share

This is a coded format that expresses, in machine-readable form, what the website is about to do with your personal data. IIRC, IE uses this already, it shows a human-readable translation of the P3P header in the status bar if the current site is serving it.

See here: Privacy Platform

The gist:

The Privacy Planning (P3P) project allows websites to express their privacy practices in a standard format that can be automatically retrieved and easily interpreted by user agents.

+9
source share

The answers above are correct, but I think it's worth mentioning why you would like to do this in terms of functionality. If you have a page that is included in a frameset from another domain, any version of IE 6 or later will block cookies for your page if the p3p header is not present.

The idea is that your page, if it is placed in a set of frames hosted by another domain, is considered the content of a "third party". The fear is that you can try to hide hidden ad tracking or other cookies in the user's browser without their knowledge. The p3p header is a way to strengthen your organization by saying, "We will not do anything to hide third-party cookies with them." The user can configure their browser to block your cookies if you do not set this header, but with IE6, which is the default setting.

+2
source share

This particular command chain is included in sites that interact with facebook and resolves Internet Explorer session problems.

0
source share

All Articles