I need to access a specific custom header to determine what content to serve. I can get the headers and output an array like this:
<?php
headers = apache_request_headers();
foreach ($headers as $header => $value) {
echo "$header: $value <br />\n";
}
?>
It outputs all headers, the one I need to access is: X-Language-Locale: it-IT
I need to parse all of the array for "X-Language-Locale" and run an if else statement to determine what content to serve. How do I do this?