array getallheaders(void);This function returns an associative array of all the HTTP headers in the current request.
Example 1. GetAllHeaders() Example $headers = getallheaders();
while (list($header, $value) = each($headers)) {
echo "$header: $value<br>\n";
} |
Note: GetAllHeaders() is currently only supported when PHP runs as an Apache module.