opensidex("Mūsų radija","on");
?>
<center></a><a href='http://78.59.112.68:8002/listen.pls'><img src="http://img508.imageshack.us/img508/5629/28422654eg4.jpg" /><center>
<br>
<marquee><center><center><span style='color:black'Online radio</span><center><marquee>
<br>
<?
$station_name = "U-Radio";
$refresh = "0"; // Page refresh time in seconds. Put 0 for no refresh
$timeout = "5"; // Number of seconds before connecton times out - a higher value will slow the page down if any servers are offline
// Note: dont include http://
// Main server: The song title will be taken from this server
$ip[1] = "78.59.112.68";
$port[1] = "8002";
$servers = count($ip);
?>
<?php
$i = "1";
while($i<=$servers)
{
$fp = @fsockopen($ip[$i],$port[$i],$errno,$errstr,$timeout);
if (!$fp)
{
$listeners[$i] = "0";
$msg[$i] = "<br><span class=\"red\">Serveris IŠJUNGTAS!</span>";
$error[$i] = "1";
}
else
{
fputs($fp, "GET /7.html HTTP/1.0\r\nUser-Agent: Mozilla\r\n\r\n");
while (!feof($fp))
{
$info = fgets($fp);
}
$info = str_replace('<HTML><meta http-equiv="Pragma" content="no-cache"></head><body>', "", $info);
$info = str_replace('</body></html>', "", $info);
$stats = explode(',', $info);
if (empty($stats[1]) )
{
$listeners[$i] = "0";
$msg[$i] = "<span class=\"red\">Netransliuojama!</span>";
$error[$i] = "1";
}
else
{
if ($stats[1] == "1")
{
$song[$i] = $stats[6];
$listeners[$i] = $stats[0];
$max[$i] = $stats[3];
$bitrate[$i] = $stats[5];
$peak[$i] = $stats[2];
if ($stats[0] == $max[$i])
{
$msg[$i] .= "<span class=\"red\">";
} else {
echo "<center><a href='http://triumas.xz.lt/profile.php?lookup=1'><img src=http://www.u-games.nkk.lt/images/avatars/avataras[1].png style='margin:5px;' alt='DJ '></a></center>";
echo "</div>\n";
echo "Eteryje: <b>DJ Kriss</b>";
}
$msg[$i] .= "Stotis translioja Stereo <br>Drauge klausosi $listeners[$i] iš $max[$i] ";
if ($stats[0] == $max[$i])
{
$msg[$i] .= "</span>";
}
$msg[$i] .= "\n <p><b>Daugiausia klausytojų-</b> $peak[$i]";
}
else
{
$listeners[$i] = "0";
$msg[$i] = " <span class=\"red\">Stotis IŠJUNGTA!</span>";
$error[$i] = "1";
}
}
}
$i++;
}
$total_listeners = array_sum($listeners) ;
print "<div id=\"blu\">\n <div style=\"text-align: left;\">\n <h8> Unikalių klausytojų - <b>$total_listeners </b></h8>\n </div>\n</div>\n<div>\n <div>\n <p><MARQUEE Scrollamount=2 width='50%'><b>Dabar groja:</b> $song[1]</p>\n </div>\n</div>\n<div>\n</MARQUEE>";
$i = "1";
while($i<=$servers)
{
print " <div>\n";
if ($max[$i] > 0)
{
$percentage = round(($listeners[$i] / $max[$i] * 100));
$timesby = (300 / $max[$i]);
$barlength = round(($listeners[$i] * "$timesby"));
}
if ($error[$i] != "1")
{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<small>Serverio naudojimas- <?php print $percentage; ?>%</small><br><br>
<td width="100%" colspan="100%" bgcolor="#00D0E0"><img src="<?php if ($percentage == "100") { print "red-"; } ?>http://triumas.xz.lt/infusions/Eterio_info_panel/bar.gif" width="<?php print $barlength ?>" height="15" alt=""></td>
</tr>
<tr>
<td width="0%">0%</td>
<td width="50%" align="right">100%</td>
</tr>
</table>
<?php
}
else
{
?>
<?php
}
print " <p><b>Statusas:</b> $msg[$i]</p>\n </div>\n <div class=\"line\"> </div>\n";
$i++;
}
print "</div>\n";
?>
<center></a><a href='http://78.59.112.68:8002/listen.pls'><img src="http://www.legalus.net/arrow-right.gif" /><center>
<br>
<?
closesidex();
ir dar viena versija :
openside("Eteryje");
$server2 = "222.222.222.222"; //Radijos serverio IP
$server2port = "8888"; //Radijos portas
$server2pass = "slaptazodis"; //Radijos slaptazodis
$dateix = fsockopen("$server2", $server2port, &$errno, &$errstr);
if( !$dateix )
{
echo "<font face='Verdana' size='2' color='black'><b>Serveris ISJUNGTAS!<b/></font><br>";
fclose($dateix);
}
else
{
fputs($dateix,"GET /admin.cgi?pass=$server2pass&mode=viewxml HTTP/1.0\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT;)\r\n\r\n");
while (!(feof($dateix)))
{
$zeilex .= fgets($dateix, 4096);
}
fclose($dateix);
}
$tmpx = explode("<CURRENTLISTENERS>", $zeilex);
$tmpx = explode("</CURRENTLISTENERS>", $tmpx[1]);
$server2lauscher = $tmpx[0];
$pl2 = " ";
$tmpx = explode("<SERVERGENRE>", $tmpx[1]);
$tmpx = explode("</SERVERGENRE>", $tmpx[1]);
$tmp2x = explode("+", $tmpx[0]);
$nick2 = $tmp2x[0];
if(count($tmp2x) == 2)
$pl2 = $tmp2x[1];
$tmpx = explode("<SERVERTITLE>", $tmpx[1]);
$tmpx = explode("</SERVERTITLE>", $tmpx[1]);
$server2title = $tmpx[0];
$tmpx = explode("<SONGTITLE>", $tmpx[1]);
$tmpx = explode("</SONGTITLE>", $tmpx[1]);
$song2title = $tmpx[0];
$tmpx = explode("<STREAMSTATUS>", $tmpx[1]);
$tmpx = explode("</STREAMSTATUS>", $tmpx[1]);
$stream2status = $tmpx[0];
//Foto nustatymai. Kas eteryje rodo foto
if($server2title == 'serveris') //ce rasyti kaip yra pasidares dj GENRE geriausia kad butu vienas zodis pvz serveris
echo "<center><img src='komanda/serveris.gif' border='2' width='128' height='95'></center><br>";
if ($stream2status == "1")
{
//Kas eteryje
echo "<font face='Verdana' size='2' color='black'><center><b> $server2title</font></b></center><br><br>";
//Ka serveris groja
if ($pl2 =="")
{
echo "";
}
else
{
echo "<a href=\"";
echo "$pl2";
echo "\" target=\"_blank\"></a>";
}
//Was wird gespielt?
echo "<font face='Verdana' size='2'
<MARQUEE scrolldelay='1' SCROLLAMOUNT='1' onmouseover='this.stop()' onmouseout='this.start()' direction='left' height='20' width='170'>
$song2title</font></MARQUEE>";
echo "<font face='Verdana' size='3' color='red'>
<center><b>Klausytis:</b><br><a href='http://$server2:$server2port/listen.pls'><img src='images/Winamp2.png' border='0' width='50' height='50'> <a href='http://$server2:$server2port/listen.pls'><img src='images/w_m_p.png' border='0' width='50' height='50'></center>";
}
//Jeigu niekas nera prisijunges i etery :)
else
{
echo "<font face='Verdana' size='3' color='red'><center>Netransliuojama</font></center>
";
}
closeside();
// Paimta iš mrcbug.com
|