note 71225 deleted from reserved.variables by tularis
| From: | tularis@php.net | Date: | Fri, 17 Nov 2006 08:49:03 +0000 |
| Subject: | note 71225 deleted from reserved.variables by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-119831@lists.php.net to get a copy of this message | ||
Note Submitter: dwalton at acm dot org
Reason: non-english
----
Another special (and underdocumented) variable in PHP is $http_response_header. This variable is
automatically filled with an array of headers when you use file_get_contents() and similar functions
to open a URL. This is true even when the function fails due to a 4xx or 5xx error and returns
false - the headers are still available in $http_response_header. And unlike
stream_get_meta_data(), this is not limited to just those functions that operate on stream
references.