<?php
include('config_radio.php');
$scfp = @fsockopen("$scip", $scport, &$errno, &$errstr, 30);
if(!$scfp) {
$scsuccs=1;
function FensterOeffnen (Adresse) {
MeinFenster = window.open(Adresse, "Zweitfenster", "width=450,height=300,left=100,top=200");
MeinFenster.focus();
}
function link_gotourl(lnk) {
window.open(lnk);
}
function link_gototb() {
window.open("http://www.city-live-radio.de/");
}
function link_molink(tr) {
tr.style.cursor = "pointer";
}
document.write('<table id="Tabelle_01" width="130" height="181" border="0" cellpadding="0" cellspacing="0">');
document.write(' <tr onClick="JavaScript:link_gototb();" onMouseOver="JavaScript:link_molink(this);">');
document.write(' <td colspan="3">');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/header.jpg" width="130" height="98" alt=""></td>');
document.write(' </tr>');
document.write(' <tr>');
document.write(' <td>');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/win.jpg" width="42" height="27" alt="" onClick="JavaScript:link_gotourl(\'http://privat.pytalhost.de/autostart/listen.pls\');" onMouseOver="JavaScript:link_molink(this);"></td>');
document.write(' <td>');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/play.jpg" width="44" height="27" alt="" onClick="JavaScript:FensterOeffnen(\'http://www.city-live-radio.de/listen/player.html\'); return false" onMouseOver="JavaScript:link_molink(this);"></td>');
document.write(' <td>');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/real.jpg" width="44" height="27" alt="" onClick="JavaScript:link_gotourl(\'http://privat.pytalhost.de/autostart/listen.ram\');" onMouseOver="JavaScript:link_molink(this);"></td>');
document.write(' </tr>');
document.write(' <tr onClick="JavaScript:link_gototb();" onMouseOver="JavaScript:link_molink(this);">');
document.write(' <td colspan="3">');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/titel.jpg" width="130" height="9" alt=""></td>');
document.write(' </tr>');
document.write(' <tr> ');
document.write(' <td height="24" colspan="3" background="http://www.city-live-radio.de/streambox/normal/bg.jpg"><marquee scrollamount="1" scrolldelay="1"><font face="Tahoma" size="1" color="#000000"><b>Aktuell läuft: Test - Test</b></font></marquee></td>');
document.write(' </tr>');
document.write(' <tr onClick="JavaScript:link_gototb();" onMouseOver="JavaScript:link_molink(this);">');
document.write(' <td colspan="3">');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/mod.jpg" width="130" height="9" alt=""></td>');
document.write(' </tr>');
document.write(' <tr> ');
document.write(' <td height="24" colspan="3" background="http://www.city-live-radio.de/streambox/normal/bg.jpg"><div align="center"><font face="Tahoma" size="1" color="#000000"><b>test</b></font></div></td>');
document.write(' </tr>');
document.write(' <tr onClick="JavaScript:link_gototb();" onMouseOver="JavaScript:link_molink(this);">');
document.write(' <td colspan="3">');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/fooder.jpg" width="130" height="45" alt=""></td>');
document.write(' </tr>');
document.write('</table>');
}
if($scsuccs!=1){
fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
while(!feof($scfp)) {
$page .= fgets($scfp, 1000);
}
######################################################################################################################
/////////////////////////part 1 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//define xml elements
$loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "MAXLISTENERS", "BITRATE", "AIM", "ICQ", "IRC");
$y=0;
while($loop[$y]!=''){
$pageed = ereg_replace(".*<$loop[$y]>", "", $page);
$scphp = strtolower($loop[$y]);
$$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed);
if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE || $loop[$y]==SERVERTITLE)
$$scphp = urldecode($$scphp);
$y++;
}
//end intro xml elements
######################################################################################################################
######################################################################################################################
/////////////////////////part 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
$pageed = ereg_replace(".*<SONGHISTORY>", "", $page);
$pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed);
$songatime = explode("<SONG>", $pageed);
$r=1;
while($songatime[$r]!=""){
$t=$r-1;
$playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]);
$playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
$song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]);
$song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]);
$song[$t] = urldecode($song[$t]);
$dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
$dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
}
fclose($scfp);
}
if($streamstatus == "1"){
function FensterOeffnen (Adresse) {
MeinFenster = window.open(Adresse, "Zweitfenster", "width=450,height=300,left=100,top=200");
MeinFenster.focus();
}
function link_gotourl(lnk) {
window.open(lnk);
}
function link_gototb() {
window.open("http://www.city-live-radio.de/");
}
function link_molink(tr) {
tr.style.cursor = "pointer";
}
document.write('<table id="Tabelle_01" width="130" height="181" border="0" cellpadding="0" cellspacing="0">');
document.write(' <tr onClick="JavaScript:link_gototb();" onMouseOver="JavaScript:link_molink(this);">');
document.write(' <td colspan="3">');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/header.jpg" width="130" height="98" alt=""></td>');
document.write(' </tr>');
document.write(' <tr>');
document.write(' <td>');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/win.jpg" width="42" height="27" alt="" onClick="JavaScript:link_gotourl(\'http://privat.pytalhost.de/autostart/listen.pls\');" onMouseOver="JavaScript:link_molink(this);"></td>');
document.write(' <td>');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/play.jpg" width="44" height="27" alt="" onClick="JavaScript:FensterOeffnen(\'http://www.city-live-radio.de/listen/player.html\'); return false" onMouseOver="JavaScript:link_molink(this);"></td>');
document.write(' <td>');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/real.jpg" width="44" height="27" alt="" onClick="JavaScript:link_gotourl(\'http://privat.pytalhost.de/autostart/listen.ram\');" onMouseOver="JavaScript:link_molink(this);"></td>');
document.write(' </tr>');
document.write(' <tr onClick="JavaScript:link_gototb();" onMouseOver="JavaScript:link_molink(this);">');
document.write(' <td colspan="3">');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/titel.jpg" width="130" height="9" alt=""></td>');
document.write(' </tr>');
document.write(' <tr> ');
document.write(' <td height="24" colspan="3" background="http://www.city-live-radio.de/streambox/normal/bg.jpg"><marquee scrollamount="1" scrolldelay="1"><font face="Tahoma" size="1" color="#000000"><b>Aktuell läuft: Test - Test</b></font></marquee></td>');
document.write(' </tr>');
document.write(' <tr onClick="JavaScript:link_gototb();" onMouseOver="JavaScript:link_molink(this);">');
document.write(' <td colspan="3">');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/mod.jpg" width="130" height="9" alt=""></td>');
document.write(' </tr>');
document.write(' <tr> ');
document.write(' <td height="24" colspan="3" background="http://www.city-live-radio.de/streambox/normal/bg.jpg"><div align="center"><font face="Tahoma" size="1" color="#000000"><b>test</b></font></div></td>');
document.write(' </tr>');
document.write(' <tr onClick="JavaScript:link_gototb();" onMouseOver="JavaScript:link_molink(this);">');
document.write(' <td colspan="3">');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/fooder.jpg" width="130" height="45" alt=""></td>');
document.write(' </tr>');
document.write('</table>');
}
if($streamstatus == "0")
{
function FensterOeffnen (Adresse) {
MeinFenster = window.open(Adresse, "Zweitfenster", "width=450,height=300,left=100,top=200");
MeinFenster.focus();
}
function link_gotourl(lnk) {
window.open(lnk);
}
function link_gototb() {
window.open("http://www.city-live-radio.de/");
}
function link_molink(tr) {
tr.style.cursor = "pointer";
}
document.write('<table id="Tabelle_01" width="130" height="181" border="0" cellpadding="0" cellspacing="0">');
document.write(' <tr onClick="JavaScript:link_gototb();" onMouseOver="JavaScript:link_molink(this);">');
document.write(' <td colspan="3">');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/header.jpg" width="130" height="98" alt=""></td>');
document.write(' </tr>');
document.write(' <tr>');
document.write(' <td>');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/win.jpg" width="42" height="27" alt="" onClick="JavaScript:link_gotourl(\'http://privat.pytalhost.de/autostart/listen.pls\');" onMouseOver="JavaScript:link_molink(this);"></td>');
document.write(' <td>');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/play.jpg" width="44" height="27" alt="" onClick="JavaScript:FensterOeffnen(\'http://www.city-live-radio.de/listen/player.html\'); return false" onMouseOver="JavaScript:link_molink(this);"></td>');
document.write(' <td>');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/real.jpg" width="44" height="27" alt="" onClick="JavaScript:link_gotourl(\'http://privat.pytalhost.de/autostart/listen.ram\');" onMouseOver="JavaScript:link_molink(this);"></td>');
document.write(' </tr>');
document.write(' <tr onClick="JavaScript:link_gototb();" onMouseOver="JavaScript:link_molink(this);">');
document.write(' <td colspan="3">');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/titel.jpg" width="130" height="9" alt=""></td>');
document.write(' </tr>');
document.write(' <tr> ');
document.write(' <td height="24" colspan="3" background="http://www.city-live-radio.de/streambox/normal/bg.jpg"><marquee scrollamount="1" scrolldelay="1"><font face="Tahoma" size="1" color="#000000"><b>Aktuell läuft: Test - Test</b></font></marquee></td>');
document.write(' </tr>');
document.write(' <tr onClick="JavaScript:link_gototb();" onMouseOver="JavaScript:link_molink(this);">');
document.write(' <td colspan="3">');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/mod.jpg" width="130" height="9" alt=""></td>');
document.write(' </tr>');
document.write(' <tr> ');
document.write(' <td height="24" colspan="3" background="http://www.city-live-radio.de/streambox/normal/bg.jpg"><div align="center"><font face="Tahoma" size="1" color="#000000"><b>test</b></font></div></td>');
document.write(' </tr>');
document.write(' <tr onClick="JavaScript:link_gototb();" onMouseOver="JavaScript:link_molink(this);">');
document.write(' <td colspan="3">');
document.write(' <img src="http://www.city-live-radio.de/streambox/normal/fooder.jpg" width="130" height="45" alt=""></td>');
document.write(' </tr>');
document.write('</table>');
}
?>