<?
error_reporting(0);
echo '<link rel="stylesheet" href="themes/TweakIt/style/style.css" type="text/css"><style type="text/css">body {background-color: transparent}</style><script type="text/javascript">
<!--
function openradiowma(){
window.open ("radyopopup.php","Radio","toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=345,height=120");
}
//-->
</SCRIPT>
<script type="text/javascript">
<!--
function openradiorm(){
window.open ("radyopopup.php?tip=1","Radio","toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,width=345,height=120");
}
//-->
</SCRIPT>
<meta http-equiv="refresh" content="60">
<font class="content"><center><a href="javascript:openradiowma()"><img src="images/windowsmedia.gif" border="0" alt="Windows Media Player"></a> <a href="javascript:openradiorm()"><img src="images/real.gif" border="0" alt="RealMedia Player"></a> <a href="http://62.68.195.78:9876/listen.pls"><img src="images/winamp.gif" border="0" alt="WinAMP"></a> <a href="http://62.68.195.78:9876/listen.pls"><img src="images/itunes.gif" border="0" alt="iTunes"></a></font>';
$fp = fsockopen("62.68.195.78", "9876", &$errno, &$errstr, 30);
if($fp) {
fputs($fp,"GET /admin.cgi?pass=xxxxxxx&mode=viewxml HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); //get XML page
while(!feof($fp)) {
$page .= fgets($fp, 1000);
}
$loop = array("STREAMSTATUS","SERVERGENRE","CURRENTLISTENERS","MAXLISTENERS"); //define all the variables to get (delte any ones you don't want)
$y=0; //dummy variable for while loop
while($loop[$y]!=''){ //while there are things in loop
$pageed = ereg_replace(".*<$loop[$y]>", "", $page); // extract data
$phpname = strtolower($loop[$y]); //make names in loop lowercase for variable names
$$phpname = ereg_replace("</$loop[$y]>.*", "", $pageed); //finish extracting data
if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE) //if for code clean-up (if you have problems with variables with URL encoding (i.e. %20 for space put them in this loop)
$$phpname = urldecode($$phpname); // replace URL code with regular text (i.e. %20 = space)
##More stuff that prints##
//echo ('$'.$phpname.' = '.$$phpname.' <BR>');
##Stop here. Your server will be upset if you comment out the next line of code ($y++;).##
$y++; //update dummy variable for while loop
}
$pageed = ereg_replace(".*<SONGHISTORY>", "", $page); //extract data
$pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed); //extract data
$songatime = explode("<SONG>", $pageed); //break data down for each song
$r=1; //dummy variable
while($songatime[$r]!=""){ //while loop for each song
$t=$r-1; //correction for first value in array from explode is worthless
$playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]); // extract data
$playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]); //extract data
$song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]); //extract data
$song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]); //extract data
$song[$t] = urldecode($song[$t]); //cleans-up the URL code thing again
##Yet even more crap that gets printed out.##
//echo ('$song['.$t.'] = '.$song[$t].' <BR>$playedat['.$t.'] = '.$playedat[$t].' <BR>');
##Same as last time. Unhappy servers tend to hurt people.##
$r++; //update loop variable
}
fclose($fp); //close connection
if($streamstatus == "1"){
echo " ".$currentlisteners."/".$maxlisteners."<br>DJ ".$servergenre."<br><br>";}
else {
echo "<br>Şu an Yayında Değiliz...<br><br>";
};
echo "1.".$song["0"]."<br>";
echo "2.".$song["1"]."<br>";
echo "3.".$song["2"]."<br>";
echo "4.".$song["3"]."<br>";
echo "5.".$song["4"]."<br>";
} else {
echo "<br>Şu an Yayında Değiliz...<br><br>";
};
?>