You are here: php force MP3 'save as' dialog « All PHP « IT news, forums, messages
php force MP3 'save as' dialog

Posted by mail on 01/24/07 19:28

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();

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация