LOGO
General Discussion Undecided where to post - do it here.

Prev Previous Post   Next Post Next
Old 05-07-2011, 09:19 PM   #1
ENGINESSQ

Join Date
Oct 2005
Posts
419
Senior Member
Default Web devs/hobbyists: quick question.
How can I force an MP3 to download from a click on a webpage?

Right now, when the user clicks a link to an MP3 (depending on the browser plug-ins installed, blah blah) the browser will open an embedded MP3 player. I want to force the browser (all browsers) to treat the link as a download only.

The best solution that I can think of to this is something like this link, but it looks like that does not work in all browsers.

Right now, I have the file zipped since .zip extensions tend to force the download prompt but this is an unnecessary step IMO.

My webpages are PHP, so a PHP solution is ideal, especially if it is elegant.

I also do not want to do that "right-click -> Save As..." nonsense either. I really want to somehow link to a page that sets the HTTP content then directs a download to the browser, something like that.

Any ideas? Thanks.

Edit: If you read Matt Farina's post on the link I provided... something like that is desired.
ENGINESSQ is offline




« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

All times are GMT +1. The time now is 10:25 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 PL2
Design & Developed by Amodity.com
Copyright© Amodity