Posted on: 05/24/03 04:06pm
By: Cregar
Posted on: 05/25/03 05:12am
By: Dirk
Well, not exactly what you're looking for, but I'm using KungTunes[*1] for the same thing and made this block to display the current song on my site:
function phpblock_iTunes () {
global $_CONF;
$retval = '';
$trackinfo = $_CONF['path_html'] . "trackinfo.txt";
if (file_exists ($trackinfo)) {
$lines = file ($trackinfo);
$retval = trim ($lines[0]);
if ($retval == '--off--') {
$retval = '';
}
}
return $retval;
}
Pretty simple: KungTunes uploads a "trackinfo.txt" file containing the song information. This function reads it and displays it in a block (unless the file contains just "--off--", then the function doesn't return anything and the block vanishes).
Hope that helps.
bye, Dirk