php force MP3 'save as' dialog
- From: mail@xxxxxxxxxxxxxx
- Date: 24 Jan 2007 11:28:23 -0800
i have implemented a working script from the interwebnethighway into my
site that forces a 'save as' dialog to pop up on clicking an mp3 link,
tho you do not get the estimated time remaining or progress bar showing
up, is there any way to make it show up, or is this simply because im
messing about with headers and leaving no proper info?
much apprectiated, thanks!
script used:
~~~~~~~~
(fileurl comes from previously in the script.....)
if(ini_get('zlib.output_compression')) {
ini_set('zlib.output_compression', 'Off'); }
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Type: audio/x-mp3");
header("Content-Disposition: attachment;
filename=\"".basename($FileURL)."\";" );
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".filesize($FileURL));
readfile("$FileURL");
exit();
.
- Follow-Ups:
- Re: php force MP3 'save as' dialog
- From: Steve
- Re: php force MP3 'save as' dialog
- Prev by Date: Http_output
- Next by Date: Re: php force MP3 'save as' dialog
- Previous by thread: Http_output
- Next by thread: Re: php force MP3 'save as' dialog
- Index(es):