-
The apache_response_headers() function allows you to obtain some of the HTTP response headers that are sent by the Apache HTTP server; it does not return all the headers, so it might not do what you expect.
-
When using file_get_contents to perform HTTP requests, the server response headers is stored in a reserved variable after each successful request; we can iterate over this when we need to access individual response headers.
-
Setting custom HTTP Headers with cURL is useful when changing User Agent or Cookies. Headers can be changed two ways, both using the curl_setopt function.
-
The PHP header function is used to send custom headers and response codes in response to HTTP requests.
-
Check if response headers has already been sent before attempting to send other headers.
-
The headers_list() function will return a list of headers sent by PHP, or headers that are ready to be sent by PHP.
-
Article documenting the reasons to use Http_response_code instead of sending raw HTTP response codes in PHP.