Ok, the code is:
<?php
//error_reporting(0);
$shoutpage = file_get_contents('http://208.100.38.3:10020');
if (eregi('Server is currently down', $shoutpage))
{
$online = false;
}
else
{
$online = true;
}
if ($online==false)
{
echo '<b>The radio\'s offline

</b><br>But don\'t worry! Check the schedule to see when your favourite DJ\'s next show is!';
}
else
{
$statpage = file_get_contents('http://208.100.38.3:10020/admin.cgi?pass=<my password>&mode=viewxml');
$stata = explode('<SONGTITLE>', $statpage);
$stata = explode('</SONGTITLE>', $stata[1]);
$csong = $stata[0];
$stata = explode('<SONGHISTORY>', $statpage);
$stata = explode('<SONG>', $stata[1]);
$stata = explode('<TITLE>', $stata[2]);
$stata = explode('</TITLE>', $stata[1]);
$lsong = $stata[0];
echo '<script language="JavaScript" type="Text/JavaScript">setTimeout(\'counter()\', 1000);</script>Current Song: <b>'.$csong.'</b><br>Last Song: <b>'.$lsong.'</b>';
}
?>
I did use fsockopen(), but that seemed to take longer. It still had the same problems as this though.
Comment/Reply (w/o sign-up)