XMMS Jukebox fun

Submitted by jay on 13 March, 2007 - 16:25

A neat little feature added to the linuxcaffe.ca website, and you can have one too ;)

Simply add this line to your song change plugin in xmms:

    echo %s > /tmp/nowplaying.txt && sh ~/nowplaying.sh

In nowplaying.sh, put the following:

Finally, on the relevant page on your site (in this case all of them), use the following PHP code (adopt to your programming language of choice):

    $filename = "/filesystem/path/to/nowplaying.txt";
    $fh = file_get_contents($filename);
    echo $fh;

Could it get any easier? Most definitely. Does it work, and work well? Absolutely. Curl is genius.

I took a peek at the linuxcaffe page again and saw something about some guy Rob Crow hating another guy named Rob Crow...

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.