if($description == "тут ни") { echo "<img src='адрес картинки'>"; }
<?php $fl = file_get_contents('http://site.ru:port/status.xsl?mount=/maunt'); 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>"); $song = antara($fl, "<td>Current Song:</td>\n<td class=\"streamdata\">", "</td>"); if($stream != ''){ echo "Описание: $description ";} else echo "Нет потока"; ?>
<?php $fl = file_get_contents('http://site.ru:port/status.xsl?mount=/maunt'); 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 == "тут ник"){ echo "<img src='адрес картинки'>"; } = antara ($fl, "<td>Stream Description:</td>\n<td class=\"streamdata\">", "</td>"); $listeners = antara($fl, "<td>Current Listeners:</td>\n<td class=\"streamdata\">", "</td>"); $song = antara($fl, "<td>Current Song:</td>\n<td class=\"streamdata\">", "</td>"); if($stream != ''){ echo "Описание: $description ";} else echo "Нет потока"; ?>
<?php $fl = file_get_contents('http://188.40.124.23:8254/?mount=/ices'); 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 ($_GET[tip]) { case "title": echo $stream; break; case "list": echo "Слушает - ".$listeners; break; case "desk": echo $description; break; case "song": echo $song; break; case "max": echo "Слушало максимум - ".$max; break; case "all": echo "В эфире - ".$stream."<br>Слушает - ".$listeners."<br>Слушало максимум - ".$max."<br>Играет - ".$song; break; } ?>