note 48207 deleted from function.header by didou
| From: | didou@php.net | Date: | Mon, 07 Feb 2005 19:00:31 +0000 |
| Subject: | note 48207 deleted from function.header by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-84630@lists.php.net to get a copy of this message | ||
Note Submitter: dotpointer
----
About Quicktime, Progressive streaming or progressive scanning.
After hours of problems trying to get PHP to deliver
progressive streaming-.MOV-files, here is the working result:
while (@ob_end_clean()); // no output buffering !
header('Cache-Control:');
header('Expires:');
header('Pragma:');
header('Set-Cookie:');
header("Content-Type: ".$strMIME);
header("Accept-Ranges: bytes");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("ETag: \"".$strETag."\"");
header("Content-Length: ".$intLength);
- $strETag is a MD5-hash of the file contents.
- $strMIME is the MIME-code from the upload.
- $intLength is the length in bytes of the uploaded file.
Notice the ORDER of the lines, also notice the " " around the
ETag, but NOT (!) around the Content-Type. Also notice
the Last-Modified and Accept-Ranges, and that we are
clearing the cache-settings. This is not science, this is a
dirty working solution.
Tested on PHP 5.0.x, using IE6 and Quicktime 6.
This works today, anyway...