I took a quick peek at the site, which is cool BTW. It seems to me that in the popup where you play the radio, you are simply setting the src attribute to an mp3 file:
Code:
<embed type="application/x-mplayer2" src="http://www.metalsuriname.com/mp3/02.%20Follow%20The%20Way.mp3" name="mediaPlayer" id="mediaPlayer" height="50px" width="280px" showControls="1"></embed>
Not sure what you mean by inserting a playlist.
It would be relatively easy to change this so that the src attribute is provided by a PHP script. To do so, one would put PHP code at the top of the page and in the embed tag:
Code:
<?php
// date('w') returns the weekday, 0-6 (6 == Sunday)
// date('H') returns the hour, 0-23 (0 == midnight, 23 == 11 PM)
if (date('w') == 4 && date('H') == 21)
{
$mp3Url = 'radio_show.mp3';
}
else
{
$mp3Url = 'normal_song.mp3';
}
?>
//html here.....
<embed type="application/x-mplayer2" src="<?php echo $mp3Url; ?>" name="mediaPlayer" id="mediaPlayer" height="50px" width="280px" showControls="1"></embed>
// rest of html here
Save the file as .php, and give it a shot. I'd love to hear how it goes.
(Note: there are many better means to do this, like AJAX, but this is an extremely simple solution)
Bookmarks