Forced downloads

software development

#1

I’m trying to find a technique to force mp3s to be downloaded rather than played in the browser when the user clicks a link. I’d like to stick to PHP/MySQL to it, but can also work with Perl if I need to.


#2

In an htaccess file, you could throw in something like this:

AddType application/octet-stream mp3

Which essentially tells your browser to download the file rather than play it as an mp3 stream.


#3

Hey, I like it; nice and simple. Thanks!