<html>
<head>
<title></title>
<link href="style.css" type="text/css" rel="stylesheet">
</head>
<body>
<center>
<table>
<tr>
<td id="top-left">
<center>
Radioens status er: <?php
// Change these to your online/offline messages //
$online = "<u>Online</u> <img src='images/online.gif' />"; // Displays when stream is online
$offline = "<u>Offline</u> <img src='images/offline.gif' />"; // Displays when stream is offline
// don't edit below //
$ip = "213.239.220.22";
$port = "12370";
$fp = @fsockopen($ip,$port,$errno,$errstr,1);
if (!$fp)
{
$status = $offline;
}
else
{
fputs($fp, "GET /7.html HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n");
while (!feof($fp))
{
$info = fgets($fp);
}
$split = explode(',', $info);
if ($split[1] == "0" )
{
$status = $offline;
}
else
{
$status = $online;
}
}
echo $status;
?>
<hr />
Du hører lige nu <b><u><?php
$ip = "213.239.220.22";
$port = "12370";
$fp = @fsockopen($ip,$port,$errno,$errstr,1);
if (!$fp)
{
$title = "Radioen er gået offline ";
}
else
{
fputs($fp, "GET /7.html HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n");
while (!feof($fp))
{
$info = fgets($fp);
}
$info = str_replace('</body></html>', "", $info);
$split = explode(',', $info);
if (empty($split[6]) )
{
$title = "Sangen findes ikke mere ";
}
else
{
$count = count($split);
$i = "6";
while($i<=$count)
{
if ($i > 6)
{
$title .= ", " . $split[$i];
}
else
{
$title .= $split[$i];
}
$i++;
}
}
}
$title = substr($title, 0, -2);
echo $title;
?></u></b>
</center>
</td>
<td id="top-middel">
<center><script type="text/javascript" src="
http://shoutcast.mixstream.net/js/external/flash/s14.myradiostream.com:12370:0:000000:ffffff:ffffff::"></script> </center>
</td>
<td id="top-right">
<a href='
http://s14.myradiostream.com/12370.pls' target="_blank"><img src="images/itunes.gif" width="50" height="50"></a>
<a href='
http://s14.myradiostream.com/12370.pls' target="_blank"><img src="images/winamp.gif" width="50" height="50"></a>
<a href='
http://s14.myradiostream.com/12370.asx' target="_blank"><img src="images/windows-media-player.gif" width="50" height="50"></a></p>
</td>
</tr>
<tr>
<td id="body" colspan="3">
<h1>Nyheds System</h1>
123
</td>
</tr>
</table>
</center>
</body>
</html>
Det er den der hedder <td id="top-left">
Hvordan får jeg den ind i til at opdatere automatisk?