<hostname>тут ссылка </hostname> <port>8000</port> <mount> <mount-name>/hit-radio</mount-name> <password>пароль</password> <charset>UTF8</charset> <stream-url>тут ссылка на поток:8000/hit-radio</stream-url> <public>1</public> <fallback-mount>/nostop</fallback-mount> <fallback-override>1</fallback-override> </mount> <mount> <mount-name>/nostop</mount-name> <password>пароль</password> <charset>UTF8</charset> <stream-url>тут ссылка на поток :8000/nostop</stream-url> <public>1</public> <fallback-mount>/hit-radio</fallback-mount> <fallback-override>1</fallback-override> </mount>
<icecast> <limits> <sources>2</sources> </limits> <authentication> <source-password>hit-project.net</source-password> <admin-user>admin</admin-user> <admin-password>hit-project.net</admin-password> </authentication> <hostname>hit-project.net</hostname> <listen-socket> <port>8000</port> <mount> <mount-name>/hit-radio</mount-name> <password>hit-project.net</password> <fallback-mount>/nonstop</fallback-mount> <fallback-override>1</fallback-override> </mount> <mount> <mount-name>/nonstop</mount-name> <password>hit-project.net</password> </mount> </listen-socket> <fileserve>1</fileserve> <paths> <logdir>./logs</logdir> <webroot>./web</webroot> <adminroot>./admin</adminroot> <alias source="/" dest="/index.html"/> </paths> <logging> <accesslog>access.log</accesslog> <errorlog>error.log</errorlog> <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error --> </logging> <security> <chroot>0</chroot> </security> </icecast>
<listen-socket> <port>8000</port> а тут маунты прописаны <listen-socket> а надо: <listen-socket> <port>8000</port> <listen-socket> потом маунты
<? header("Content-type: text/html; charset=utf-8"); if($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { $ip = "hit-project.net"; //your server address in the form of mydomain.com or 192.161.1.1 $port = "8000"; //the port of your server $ice2_station = "hit-radio"; // your station or stream name ////////////////start the parsin action\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //opening socket $fp = fsockopen($ip, $port, $errno, $errstr, 1); //open connection if(!$fp) { $success=2; //set if no connection //edit html to fit your stations site, this display is for offline status echo'<table width="100%" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0"> <tr> <td width="100%" colspan="2"> <img border="0" src="/radio/images/ice2_status/Attention.png" width="20" height="20"> <b><font face="Arial" size="1" >Радио отключено!</font></b></td> </tr> </table>'; } if($success!=2){ //if connection fputs($fp,"GET /status2.xsl HTTP/1.0\r\nUser-Agent: Icecast2 XSL Parser (Mozilla Compatible)\r\n\r\n"); //get status2.xsl while(!feof($fp)) { $page .= fgets($fp, 1000); } fclose($fp); //close connection $page = ereg_replace(".*<pre>", "", $page); //extract data $page = ereg_replace("</pre>.*", ",", $page); //extract data $numbers = explode(",",$page); //bomb it and extract data $mount = $numbers[0]; $connections = $numbers[1]; $stream_n = $numbers[2]; $listeners = $numbers[3]; $desc = $numbers[4]; $cur_song = $numbers[5]; $str_url = $numbers[6]; $client_info = $numbers[7]; $test1 = $numbers[8]; //set vars that where empty and still dont know what the heck those values are ;-) $test2 = $numbers[9]; //set vars that where empty and still dont know what the heck those values are ;-) $test3 = $numbers[10]; //set vars that where empty and still dont know what the heck those values are ;-) $mount = $numbers[12]; $connections = $numbers[13]; $station =$numbers[14]; $listeners = $numbers[15]; $description = $numbers[16]; $cur_song = $numbers[17]; $www_url = $numbers[18]; //edit html to fit your stations site, this display is for online status echo' <table width="130%" style="border-collapse: collapse" cellpadding="0" cellspacing="0"> <tr> <td width="100%"><b><font face="Arial" size="1"> <!--img border="0" src="/radio/images/ice2_status/dj-beanie.png" width="20" height="20"--> <font color="#FFF">Ведущий:</font><font color="#008cf0"> '.$station.'</font></font></b></td> </tr> <tr> <td width="100%"><b><font face="Arial" size="1"> <!--img border="0" src="/radio/images/ice2_status/User.png" width="20" height="20"--> <font color="#FFF">Слушателей:</font><font color="#008cf0"> '.$listeners.'</font></font></b></td> </tr> <tr> <td width="100%"><b><font face="Arial" size="1"> <!--img border="0" src="/radio/images/ice2_status/iTunes.png" width="20" height="20"--> <font color="#FFF">Сейчас играет:</font><br><font color="#008cf0"><left>'.$cur_song.'</left></font></font></b></td> <td width="100%"> '.$playList.' </td> </tr> </table>'; } } ?>
<script> function radio_online() { jQuery.post("./status.php" , {} , function(response) { jQuery("#radio_online").html(response); }, "html"); setTimeout("radio_online();", 3000); } radio_online(); </script> <div id="radio_online">Загрузка...</div>