Location: PHPKode > projects > ActualAnalyzer > data/p3pheader.php
<?php

/*----------------------------------------------------------------------------*/
// Headers for Platform for Privacy Preferences (P3P)
// See more about P3P project at http://www.w3.org/P3P/
/*----------------------------------------------------------------------------*/

//---   settings section   ---------------------------------------------------//

// The path to the main file of P3P policy of your web site. It may be full path
// ($p3police='http://domain.com/w3c/p3p.xml';) or relative path
// ($p3police='/w3c/p3p.xml';). Leave it empty ($p3police='';) if you don't have
// own P3P policy and want to use the default empty policy from the ActualAnalyzer
// pack.
$p3police='';

// The headers of the P3P policy of your web site
// (example: $p3pheaders='NOI CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT';).
// Leave it empty $p3pheaders='';) if you don't have own P3P policy and want to
// use the default headers of the policy from the ActualAnalyzer pack.
$p3pheaders='';

//---   end of settings section   --------------------------------------------//

if(empty($p3police)) $p3police=p3plocation();
if(empty($p3police)) $p3police='./w3c/p3p.xml';

if(empty($p3pheaders)) $p3pheaders='NOI CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT';

Header('p3p: policyref="'.$p3police.'", CP="'.$p3pheaders.'"');

function p3plocation() {
  global $HTTP_SERVER_VARS,$_SERVER;

  if(isset($_SERVER['REQUEST_URI'])) $page=$_SERVER['REQUEST_URI'];
  elseif(isset($HTTP_SERVER_VARS['REQUEST_URI'])) $page=$HTTP_SERVER_VARS['REQUEST_URI'];
  if(isset($_SERVER['SCRIPT_NAME'])) $page=$_SERVER['SCRIPT_NAME'];
  elseif(isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) $page=$HTTP_SERVER_VARS['SCRIPT_NAME'];
  else $page='';

  $pagearr=preg_split("/\//",$page,0, PREG_SPLIT_NO_EMPTY);
  $max=sizeof($pagearr);
  if(!$max) return '';

  $pagearr[$max-1]='';
  return '/'.join('/',$pagearr).'w3c/p3p.xml';
}

?>
Return current item: ActualAnalyzer