Hi,
Im building a download counter for my website. I have some Mp3's of my band and I want to keep track on how many times those mp3's have been downloaded.
My page is biult woth flash. I have a button that directs the user to:
download.php?file=song1.mp3
The download.php script checks the mysql database adds +1 download to that file and then it redirects using this code:
header("Location: " . $FILES_DIR . $file);
The problem is: That instead of that mp3 being downloaded it is opened in the webbrowser (with quicktime player), But I dont want this. I want the file being downloaded to the user's hard drive. The only solution I know for this problem is zipping the mp3's to have a 'song1.zip' file. But Im sure theres a better solution for this..
anyone knows???
Note: because my website is using flash, user CAN'T right clik the button to choose 'save target as'