views:

349

answers:

2

PHP allows you to send RAW HTTP headers, which must be sent before any of the content.

For instance(straight from the PHP documentation):

<?php
// We'll be outputting a PDF
header('Content-type: application/pdf');

// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');

// The PDF source is in original.pdf
readfile('original.pdf');
?>

But where can I find a comprehendable list or tutorial or guide on all possible options for this function? W3schools and such isn't much help.

+7  A: 

Wikipedia has a nice list: http://en.wikipedia.org/wiki/List_of_HTTP_headers

Drakia
Should point out that it's the Responses table from that page, though...
Stobor
+3  A: 

I think this is what you're interested in...

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

Straight from the source.

NOTE: that's not the "w3school" link. that's the HTTP RFC standard inked by Roy Fielding... same guy who came up with REST

nategood