note 24576 added to function.header
| From: | NO_SPAMsean at localhardcore dot net | Date: | Wed, 21 Aug 2002 23:13:14 +0000 |
| Subject: | note 24576 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-35338@lists.php.net to get a copy of this message | ||
You can use this to make the browser download mp3's without a browser plugin interfering:
header("Cache-control: private");
header("Content-Type: application/mp3");
header("Content-Disposition: filename=$mp3filename");
$fp = fopen("$file", 'r');
fpassthru($fp);
fclose($fp);
Hope that helped.
--
http://www.php.net/manual/en/function.header.php
http://master.php.net/manage/user-notes.php?action=edit+24576
http://master.php.net/manage/user-notes.php?action=delete+24576
http://master.php.net/manage/user-notes.php?action=reject+24576