8.6. HTTP Headers

HTTP headers are special commands sent between the browser and Web server before the browser receives any content. Some of the headers let the server know which file the browser wants. Others may instruct the browser about the type of file it will soon send. To learn more about headers, refer to the HTTP specification, originally described in RFC 1945 and currently described in RFC 2616. It and other documents may be found at the W3C site, which has a section devoted to the HTTP protocol <http://www.w3.org/Protocols/>. For an overview of how headers work with PHP, turn back to Chapter 7.

boolean header(string http_header, boolean replace, integer response)

The header function (Listing 8.9) sends an HTTP header to the browser. ...

Get Core PHP Programming, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.