Download script for mp3s
Date: 01/24/06
(PHP Community) Keywords: php, browser, database
I have mp3s from my album in a folder on the site. Then I have downloads.php?id=#, which reads the details of the id from the database and constructs the url of the file then sends that to the browser. It's definitely getting the right file...
Is it ok to use header location: to give out the file to the browser for a media file? I'm getting the code instead of the binary file when I try to download.
This was not happening on my WAMP dev server and is definitely happening on my LAMP production server. I'm wondering if it's a php thing or a server environment thing?
It's php 4.3.10, btw.
Any suggestions? My site is so close to being done!
Thanks!
Source: http://community.livejournal.com/php/401592.html