Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: internetinės radijos panelės klaida

Parašė lushkyz· 2012 Vas. 20 18:02:39
#1

Sveiki, info.php faile surašau viską taip, viskas teisingai, tačiau įėjus į puslapį vistiek rodo kad radija išjungta, mėginau gal 5 temas su visomis tas pats.







 <html> <body> <?php //

 

 

 

$station_name = "Šilo FM";

 

$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 <a href='http://' target='_blank'><span style='color:005C5B'>http://</span></a>

// Main server: http://86.38.185.184:8002

 

$ip[1] = "s1.justhost.lt";

$port[1] = "5009";

 

 

 

 

$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://tavo.saitas.lt/profile.php?lookup=1'><img src=paveikslelio adresas kuri nori kad rodytu paneleje style='margin:5px;' alt='DJ '></a></center>";

echo "</div>\n";

echo "Eteryje: <b>DJ</b>";

 

 

 

 

 

 

 

 

 

}

$msg[$i] .= "Stotis transliuoja Mono <br>Drauge klausosi $listeners[$i] žmonių. ";

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=4 width='100%'><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";

 

?>

 

?> </body> </html>.