Downloading an MP3

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
Jane_prg
Forum Newbie
Posts: 2
Joined: Tue Apr 17, 2007 2:20 pm

Downloading an MP3

Post 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
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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?
Jane_prg
Forum Newbie
Posts: 2
Joined: Tue Apr 17, 2007 2:20 pm

Post 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
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post 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?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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
Post Reply