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.