note 21331 deleted from function.header by sniper

From: Date: Sun, 07 Sep 2003 21:28:06 +0000
Subject: note 21331 deleted from function.header by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-55601@lists.php.net to get a copy of this message
Note Submitter: rhett@mmind.net ---- if you want to have a link to an mp3 on your website, but don't want quicktime to load it, but rather download it to your machine, use this php script where $mp3name is the name of the mp3 without the .mp3 extension (do this to keep people from leeching mp3s from your site): header("Cache-control: private"); header("Content-Type: application/mp3"); header("Content-Disposition: attachment; filename=$mp3name.mp3"); if you want to keep the .mp3 extension on your files on your site, simply take away the .mp3 in the last line of the script.

« previous php.notes (#55601) next »