|  | Posted by Toby A Inkster on 05/01/07 12:07 
Toby A Inkster wrote:
 > Assuming that the audio is stored in files on the server. (e.g. MP3s,
 > OGGs, etc) you could use the PHP system() function to launch command-line
 > programs to play the files. There are various non-interactive command-line
 > audio players available, such as mpg123, ogg123, etc.
 
 PS: See also http://tobyinkster.co.uk/article/jukebox/
 
 It's a Linux/GTK2 media player written in Perl. Only supports OGG files,
 but adding support for other formats wouldn't be too difficult.
 
 More to the point though, it provides a TCP/IP interface, so your PHP
 script could open a connection to localhost:5853 and send commands like:
 
 list
 (retrieves list of available songs, each with a number)
 play 55
 (plays number 55 from above list)
 vdown
 (lower volume 10%)
 
 --
 Toby A Inkster BSc (Hons) ARCS
 http://tobyinkster.co.uk/
 Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux
 [Back to original message] |