October 2nd, 2003, 06:15 PM
Script to download a mp3
My make a webpage from my friends band and i have mp3's on there but i when ever u clik a link to them they just play from online... i would like to know how to get it to download insted of playing offline like that www.kattywhompus.cjb.net is the site so if anyone could help please let me know
October 2nd, 2003, 09:34 PM
If you have PHP capabilities with your hosting, you can use headers with the fopen feature that will force certain file types, based on what you put in your header, to download instead of just opening, thus forcing the download of an MP3 file.
header("Content-disposition: attachment; filename=$filename.mp3");