<?php $data = file_get_contents('http://**********/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); } if(antara($data, "Mount started:</td>\n<td class=\"streamdata\">","</td>") ==''){$data = file_get_contents('http://localhost:88/status.xsl?mount=/nonstop');} $data = iconv("utf-8", "cp1251", $data); $title = antara($data, "Stream Title:</td>\n<td class=\"streamdata\">","</td>"); $description = antara($data, "Stream Description:</td>\n<td class=\"streamdata\">","</td>"); $content_type = antara($data, "Content Type:</td>\n<td class=\"streamdata\">","</td>"); $Mount_started = antara($data, "Mount started:</td>\n<td class=\"streamdata\">","</td>"); $Bitrate = antara($data, "Bitrate:</td>\n<td class=\"streamdata\">","</td>"); $Current_listeners = antara($data, "Current Listeners:</td>\n<td class=\"streamdata\">","</td>"); $Peak_listeners = antara($data, "Peak Listeners:</td>\n<td class=\"streamdata\">","</td>"); $Stream_genre = antara($data, "Peak Listeners:</td>\n<td class=\"streamdata\">","</td>"); $Stream_url = antara($data, "Stream URL:</td>\n<td class=\"streamdata\">","</td>"); $Current_song = antara($data, "Current Song:</td>\n<td class=\"streamdata\">","</td>"); $hellp_curr_listeners = antara($hellp, "Сейчас слушают:</td>\n<td class=\"streamdata\">","</td>"); $hellp_peak_listeners = antara($hellp, "Максимум было</td>\n<td class=\"streamdata\">","</td>"); $Curr_listens=$Current_listeners2+$Current_listeners+$hellp_curr_listeners; $Peak_listens=$Peak_listeners2+$Peak_listeners+$hellp_peak_listeners; $staylst=$Curr_listens+1; echo '<span style="font-size: 15px; font-family:Trebuchet MS, Tahoma, Arial, sans-serif; color:#3090c3"><b>Название радио:</b> '.$title.' <br> <b>За пультом:</b> '.$description.' <br> <b>Битрейт:</b> '.$Bitrate.' <br> <b>Сейчас в эфире:<br /></b> '.$Current_song.' <br> <br> <center><input type="button" value="Слушать радио в плеере" onclick="location.href=\'http://************/live.m3u\'" /></center>'; ?>
<META HTTP-EQUIV="REFRESH" CONTENT="30">