Jump to content

Stream a Binary File (mp3)


deejross

Recommended Posts

I found a cool program the other day, GNUMP3d, which has stopped development and was coded in perl (i think). It's basically a web frontend to your personal music collection on your computer. I want to develop something similar in PHP, but need help with a couple details. The music files aren't in the web directory, but they are in another directory on the same machine. The way GNUMP3d does this is when you click on a link, you get an .m3u playlist which contains an http link to the song's id and the web server actually streams the data to the music player.

 

So I have two questions about this:

1) can php open a binary file not located in the www directory (such as /home/user/music)?

2) To stream the music file using php, would I just need to open the file and do a while loop to echo the contents of the file, or is there something special that needs to be done?

 

Thanks for any help,

 

Ross

Link to comment
https://forums.phpfreaks.com/topic/99245-stream-a-binary-file-mp3/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.