Reply to Re: how do I force mp3s to download, rather than play?

Your name:

Reply:


Posted by ZeldorBlat on 03/14/07 15:37

On Mar 14, 10:56 am, "lawrence k" <lkrub...@geocities.com> wrote:
> I want files like this to download, rather than play in people's
> browsers:
>
> http://www.monkeyclaus.org/media/audio/abel_okugawa/816_mix/trumpethe...
>
> Can I fix this with a directive in an .htaccess file? If not, suppose
> I serve it through a php file that opens the file and reads and
> streams it to the requesting browser. Is there some header I could
> sent with the header() function that would force a download? Would I
> be breaking the internets if I sent a long an unknown mime-type just
> to force a download?

You can usually force a download with the following header:

header('Content-Disposition: attachment; filename=somefile.mp3');

More info can be found here:

<http://www.google.com/search?q=force+download>

[Back to original 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

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