On Sat, August 5, 2006 8:08 am, Ville Mattila wrote:
> I have been thinking of making a simple web-based interface to control
> my media center box (running debian linux). Being a bit enthustiatic,
> I
> thought I could use some generic tools for playing media files and
> write
> the whole UI by my own.

There are more than a few PHP Jukebox applications out there...

Maybe see how they did it.

> I found mpg123 program that can be run in "remote mode" (mpg123 -R) so
> that playback can be controlled via stdin. Writing "LOAD <mp3 file>"
> to
> the stdin will begin output, "PAUSE" will stop it and so on.
>
> How could I use PHP and its process functions to send something to
> stdin
> of a persistent process? I would like to run mpg123 only once,
> whichafter a few PHP scripts would send data and proper commands to
> its
> stdin. Maybe a kind of daemon process would be needed? Anyway, sending
> data to a daemon can be problematic... Maybe a kind of socket wrapper?
> Well - I have no experience about socket functions of PHP...

http://php.net/socket

should get you started on this road.

> Tips and tricks are welcome, or should I just go to the local hi-tech
> market and by a CD player LOL :D



-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to