
March 24th, 2004, 12:11 AM
|
|
|
|
Join Date: Apr 2007
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Using PHP to play (server side) audio
Hey!
I've got an old 400MHz PII that I want to turn into an audio player. It's going to sit in an enclosed stereo cabinet and connect to the stereo system via SPDIF. It will be on my local home network. This system will either run Apache on freeBSD, some linux flavor, or Win2k -- whichever turns out to be the easiest for this project.
So, what I'd like to do, is code a PHP website accessible to the local network that displays a list of audio files (.wav, .shn, .flac) contained in a directory on the server. When a file (or file list) is clicked, the server plays the audio locally (not on the client side), which would be connected to the stereo via SPDIF. This would allow me to control the music on the server from my wireless laptop, or other computers on the network by going to this intranet site.
I guess the PHP would have to use a system() command or something equivalent to invoke a player and load the proper audio. Or is there a better way to accomplish this with PHP? Or, perhaps, is there no way to accomplish this? I know that there are other routes to accomplish this task, but I'm most efficient in PHP/Apache and want to know there is a way to do it using these tools.
I don't have any practice using system() and exec() type functions. Perhaps I am looking beyond their capabilities?
Thanks in advance!
|