Forced downloads

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.

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.

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