note 89516 deleted from function.readfile by thiago
| From: | thiago@php.net | Date: | Thu, 12 Mar 2009 04:03:17 +0000 |
| Subject: | note 89516 deleted from function.readfile by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151755@lists.php.net to get a copy of this message | ||
Note Submitter: jordan314
----
This mp3 serving script works on mac and PC, including IE, but for some reason doesn't work on
the iPhone. The message I get in the quicktime player is "The movie could not be opened."
-------
header("Content-Disposition: filename=" . urlencode($file));
header("Content-Type: audio/mpeg");
header("Content-Description: File Transfer");
header("Content-Length: " . filesize($file));
flush();
$fp = fopen($file, "r");
while (!feof($fp))
{
echo fread($fp, 65536);
flush();
}
fclose($fp);
exit();