"; } print "
"; ?>
Server Offline"; $error[$i] = "1"; } else { fputs($fp, "GET /7.html HTTP/1.0 User-Agent: Mozilla "); while (!feof($fp)) { $info = fgets($fp); } $info = str_replace('
', "", $info); $info = str_replace('', "", $info); $stats = explode(',', $info); if (empty($stats[1]) ) { $listeners[$i] = "0"; $msg[$i] = "There is no source connected"; $error[$i] = "1"; } else { if ($stats[1] == "1") { $song[$i] = $stats[6]; $listeners[$i] = $stats[0]; $max[$i] = $stats[3]; $bitrate[$i] = $stats[5]; $peak[$i] = $stats[2]; if ($stats[0] == $max[$i]) { $msg[$i] .= ""; } $msg[$i] .= "Server is up at $bitrate[$i] kbps with $listeners[$i] of $max[$i] listeners"; if ($stats[0] == $max[$i]) { $msg[$i] .= ""; } $msg[$i] .= "
Listener peak: $peak[$i]"; } else { $listeners[$i] = "0"; $msg[$i] = " ERROR [Cannot get info from server]"; $error[$i] = "1"; } } } $i++; } $total_listeners = array_sum($listeners) ; print "
Current song: $song[1]
Listeners | |||
0% | 50% | 100% |
Listeners | |||
0% | 50% | 100% |
"; $time_difference = "0"; // BST: 1 GMT: 0 $time_difference = ($time_difference * 60 * 60); $time = date("h:ia", time() + $time_difference); $date = date("jS F, Y", time() + 0); print "
"; ?>