I am using a script to pipe different files, depending on their type. For instance, some of the files are PDF files. I am using the following code, which is pretty simple:
header("Content-Type: $contenttype\n");
header("Content-Length: ".filesize($includefile));
readfile($includefile);
Where $contenttype is the content type - i.e. "application/pdf" and $includefile is the file that I am piping.
Is there a way to change the title that is displayed in the browser title bar?
I tried using header("Title: New Title\n"); but that didn't seem to work.
I'm looking for a general solution - not just something that will work for PDF files. The script should be able to pipe other formats as well, if necessary.
Any suggestions?
Thanks,
Brad