Download mp3's

when clicking on a link for an mp3 (www.mywebsite.com/song.mp3) on my website, the mp3 plays in my I.E. explorer window because it is set as my default. I assume that most visitors to the site will have a pre-set application to run mp3’s. Is there a way to force the mp3 to actually download instead of running the 3rd party application? I want the pop-up box to appear on all users allowing them the option of saving it to their harddrive. I can achieve this by .rar or .zip, but I would prefer not to go this route.

Any suggestions?

Thanks,

'pos

nope…

any wierd extension will prompt to save, etc. tho… just put a note to change extension after download…

example: MyMp3.dgo

Rev

i know you can force a download with server side scripting (ie. php). but i’m not sure how to do that. :-\

you should run a search at google.com. :wink:

General idea is something like this (which is just a quick copy/paste from a script i use to push back a server generated pdf…)

 <?
 header("Content-Type: application/octet-stream; name=".$HTTP_POST_VARS["filename"]);
 header("Content-length: " . strlen($HTTP_POST_VARS["pdfdata"]));
 header("Content-Transfer-Encoding: binary");
 header("Accept-Ranges: none");
 header("Content-Disposition: attachment; filename=".$HTTP_POST_VARS["filename"]."
");
 echo $HTTP_POST_VARS["pdfdata"];
 ?>