Page 1 of 1

Downloading an MP3

Posted: Tue Apr 17, 2007 2:35 pm
by Jane_prg
Hello.How are You?

I'm wondering about how to setup an mp3 for downloading from my server using php.
Should I use something like a filesystem object to convert the data to byte data?
I'm at a bit of a loss right now.A tutorial would be helpfull.

Thank you

Posted: Tue Apr 17, 2007 3:55 pm
by RobertGonzalez
Are you trying to dynamically create the MP3 or are you just linking to it? And why is this in General Discussion if this is a PHP question?

Posted: Tue Apr 17, 2007 5:26 pm
by Jane_prg
I'm sorry about not posting in the proper place.
I mean making a mp3 file(stored on my server) available for people to download.How do I go about this in php code?(i.e do I have to convert the mp3 to a byte type object first etc.).I'm not talking about just playing it.A tutorial link would be good.
Thanks

Posted: Tue Apr 17, 2007 6:09 pm
by RobertGonzalez
Don't worry about the placement for now. So the files are on your server and you want people to be able to download them? Can you just throw a link to the file?

Posted: Tue Apr 17, 2007 6:28 pm
by John Cartwright
If your looking for a way to download files through php, for whatever reason, you could use this snipplet posted in our useful post thread