Page 1 of 1
PHP headers... please brief explanation of headers is needed
Posted: Sat Jun 03, 2006 10:55 am
by danselstudios
first of all, any great links to tutorials or guides to learning about HTTP headers, please post them.
what do they do? which ones are necessary?
how do i place them with PHP?
Posted: Sat Jun 03, 2006 11:12 am
by Chris Corbyn
Headers tell the web browser what do with the content it is receiving. For example, if the headers tell the browser that the content-type is text/html the browser will render it. If they tell the browser it's application/zip the browser will ask you to save it.
The status code returned may suggest to your browser that it should use the cached version or that it should download the page again... there are all kinds of things you can do with headers.
header() is used to send HTTP headers in PHP
before you generate any output.
Take a look at the RFCs for the HTTP/1.1 and 1.0 protocols for a good bit of information

Posted: Mon Jun 05, 2006 4:27 pm
by danselstudios
thanks man, thats really helpful...i was really lost until now.
i'll look more into it now, thats for sure.
Posted: Tue Jun 06, 2006 1:00 am
by Luke
I was just reading about output buffers in this article, but this gives a down and dirty explanation of headers as well as OB...
http://www.zend.com/zend/art/buffering.php