; TchLog decides whether or not the DNAS logfile should track yp ; directory touches. Adds and removes still appear regardless of ; this setting. ; Default is yes ; TchLog=yes
; TchLog decides whether or not the DNAS logfile should track yp ; directory touches. Adds and removes still appear regardless of ; this setting. ; Default is yes TchLog=no
; Yport, port to connect to yp.shoutcast.com on. For people behind caching ; webproxies, change this to the alternate port (666 is what it might be, ; check www.shoutcast.com if you have problems). Otherwise, leave this at 80. ; We're actively working on re-opening port 666, but as of release the only ; working port is port 80. Yport=80
; Yport, port to connect to yp.shoutcast.com on. For people behind caching ; webproxies, change this to the alternate port (666 is what it might be, ; check www.shoutcast.com if you have problems). Otherwise, leave this at 80. ; We're actively working on re-opening port 666, but as of release the only ; working port is port 80. ; Yport=0
$currenttrack = $params['ICESTATS'][$mountpoint]['TITLE']; $server_name = $params['ICESTATS'][$mountpoint]['server_name']; $server_description = $params['ICESTATS'][$mountpoint]['server_description']; $icq_dj = $params['ICESTATS'][$mountpoint]['server_url'];
<?php $server = "IP:8000"; $user = "USER"; $passw = "PASS"; $mountpoint = "/mixradio"; $fp = fopen("http://$user:$passw@$server/admin/stats","r") or die("Error reading Icecast data from $server."); while(!feof($fp)) { $data .= fread($fp, 8192); } fclose($fp); // Now parse the XML output for our mountpoint $xml_parser = xml_parser_create(); xml_parse_into_struct($xml_parser, $data, $vals, $index); xml_parser_free($xml_parser); $params = array(); $level = array(); foreach ($vals as $xml_elem) { if ($xml_elem['type'] == 'open') { if (array_key_exists('attributes',$xml_elem)) { list($level[$xml_elem['level']],$extra) = array_values($xml_elem['attributes']); } else { $level[$xml_elem['level']] = $xml_elem['tag']; } } if ($xml_elem['type'] == 'complete') { $start_level = 1; $php_stmt = '$params'; while($start_level < $xml_elem['level']) { $php_stmt .= '[$level['.$start_level.']]'; $start_level++; } $php_stmt .= '[$xml_elem[\'tag\']] = $xml_elem[\'value\'];'; eval($php_stmt); } } $currenttrack = $params['ICESTATS'][$mountpoint]['TITLE']; $server_name = $params['ICESTATS'][$mountpoint]['server_name']; $server_description = $params['ICESTATS'][$mountpoint]['server_description']; $icq_dj = $params['ICESTATS'][$mountpoint]['server_url']; echo " <style type='text/css'> { text-decoration: none; } IMG { border: 0; } .brd { border: 4px dotted red; } </style> <table width='100%'><tr><td width='33%' background='http://mixradio.zapto.org/templates/mixradio-red/images/radio3.gif'></td> <td class='brd' bgcolor='white'> <div align='left'> <div align='center'><b><big>.:DJ-$server_name:.</big></b></div> <br><img src=http://mixradio.zapto.org/templates/mixradio-red/images/dj/$server_description> <br /> <div align='center'>Играет трэк: <br />$currenttrack</div></div> <div align='center'>ICQ DJ: $icq_dj</div> <br /> <br><div align='center'>Чтобы слушать радио нажмите</div><br></div> <div align='center'><a href='http://mixradio.zapto.org:8000/mixradio.m3u'><img src=http://mixradio.zapto.org/templates/mixradio-red/images/play2.jpg></a></div> </td><td width='33%' background='http://mixradio.zapto.org/templates/mixradio-red/images/radio1.gif'></td></tr></table>"; ?>
$fp = fopen("http://$user:$passw@$server/admin/stats","r") or die("Error reading Icecast data from $server.");
<?php $portradio="8000"; // Порт сервера $ipradio="mixradio.zapto.org"; // IP адрес сервера $fp = @fsockopen($ipradio, $portradio, $errno, $errstr, 1); if($fp >= 1){ $radiostatus = include "advanced.php";} else{ $radiostatus = include "offilne2.php"; } ?>
<!--RADIO BLOCK -----------> <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#dcd8d3"> <tr> <td> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="30" height="25"><img src="{THEME}/images/left_cont.jpg"></td> <td width="100%" height="25" background="{THEME}/images/bgt.jpg" ><font style="font-family: tahoma; font-size:14px; font-weight:bold; color:#00E828"><center>.:Radio Status:.</center></font></td> <td width="21" height="25"><img src="{THEME}/images/right.jpg"></td> </tr> </table> </td> </tr> <tr> <td style="padding-left:10px; padding-bottom:15px; padding-top:10px; padding-right:10px; border-left: 1px solid; border-right: 1px solid; border-color: #DEDEDE; text-align:justify;"> <!-- Вывод статуса радио --> <?php include "engine/modules/radioplugin.php";?> <!-- Вывод статуса радио --> </td> </tr> <tr> <td class="cont11" style="padding-left:10px; padding-right:10px; border-left: 1px solid; border-right: 1px solid; border-color: #DEDEDE;"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td></td> <td style="text-align:right; font-size:11px" width="100%"></td> </tr> </table> </td> </tr> <tr> <td> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="30" height="7"><img src="{THEME}/images/bottom_left.jpg"></td> <td height="7" width="100%" background="{THEME}/images/bottom_center.jpg"></td> <td width="21" height="7"><img src="{THEME}/images/bottom_right.jpg"></td> </tr> </table> </td> </tr> </table> <br /> <!--/RADIO BLOCK ---------------->