<?php $json = file_get_contents("http://listen.rcast.pro:8000/json.xsl?mount=/krueger"); $json = str_replace("parseMusic (", "", $json); $json = str_replace("},", "}", $json); $json = str_replace(");", "", $json); $obj = json_decode($json); echo $obj->{'/krueger'}->{'title'}; ?>
<? $data = file_get_contents('http://radiosity.listen.moeradio.ru:10000/ru_status.xsl?mount=/radiosity'); 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); } $Current_song = antara($data, "Сейчас играет:</td>\n<td class=\"streamdata\">","</td>"); echo 'Сейчас играет: '.$Current_song.' <br>' ?>