<?php error_reporting(0); header("Content-Type: text/html; charset=cp1251"); $file_name="http://91.228.152.154:8000/status.xsl?mount=/live"; $r=fopen($file_name,'r'); $text=fread($r,10000); fclose($r); $mas=explode('<tr>', $text); $name = explode(':', $mas[3]); $q = explode ('</td>',$name[1]); $q2 = explode ('<td class="streamdata">',$q[1]); $rj = $q2[1]; if($rj == "0" or $rj == ""){ echo " Nonstop"; }else { $fl = file_get_contents('http://91.228.152.154:8000/status.xsl?mount=/live'); function antara($string, $start, $end){ $string = " ".$string; $ini = strpos($string,$start); if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini; return substr($string,$ini,$len); } $stream = antara($fl,"<td>Stream Title:</td>\n<td class=\"streamdata\">","</td>"); $description = antara($fl, "<td>Stream Description:</td>\n<td class=\"streamdata\">", "</td>"); $listeners = antara($fl, "<td>Current Listeners:</td>\n<td class=\"streamdata\">", "</td>"); $max = antara($fl, "<td>Peak Listeners:</td>\n<td class=\"streamdata\">", "</td>"); $song = antara($fl, "<td>Current Song:</td>\n<td class=\"streamdata\">", "</td>"); switch ($stream) { case "gccvhvhgv": echo "<img src='http://dfm.ru/upload/contents/406/logo_bomb.gif' wight=100%>"; break; } echo ""; } ?> <p class="ttl"><a title="Команда Радио" href="/dj"><? echo $stream ?></a></p> <div class="audio"> <div> <strong><? echo $song ?></em></strong> </div> </div>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <link rel="stylesheet" type="text/css" href="/style.css" /> <title>Icecast Streaming Media Server</title> </head> <frameset rows="170,*" border="0"> <frame name="header" frameborder="0" scrolling="no" width="100%" src="/statusbar.html" /> <frame name="content" frameborder="0" scrolling="auto" width="100%" src="/status.xsl" /> </frameset> </html>