WItam...mam skrypt ktory pokazuje ilu jest sluchaczy na serverze radia i czy radio dziala....oto kod:
[php:1:017d4ebed1]
<?php
$nag = "n a s z e s e r w e r y";
$text = '';
$hosty = array("spokostacja.no-ip.com");
$porty = array("8000");
$pojemnosc = array("40");
$l = 0;
while ($l < count($hosty)) {
$ktory = $l + 1;
// Connect to server
$fp1 = @fsockopen($hosty[$l], $porty[$l], &$errno, &$errstr, 10);
if (!$fp1) {
$text .= "<b>Serwer $ktory</b> - Radio Padło<br>";
} else {
// Get data from server
fputs($fp1, "GET /7 HTTP/1.1nUser-Agent:Mozillann");
// exit if connection broken
for($i = 0; $i < 1; $i++) {
if (feof($fp1)) break;
$fp_data1 = fread($fp1, 31337);
usleep(500000);
}
// Strip useless junk from source data
$fp_data1 = ereg_replace("^.*<body>", "", $fp_data1);
$fp_data1 = ereg_replace("</body>.*", "", $fp_data1);
// Place values from source into variable names
list($current1, $status1, $peak1, $max1, $reported1, $bit1, $song1) = explode(",", $fp_data1, 7);
$z1 = $current1;
if ($status1 == "1") {
$text .= "<b><a href="http://$hosty[$l]:$porty[$l]/listen.pls">Serwer $ktory</a> $z1 / $pojemnosc[$l]</b><br>(jako¶ć 24 kbps)<br>";
} else {
$text .= "<b>Serwer $ktory</b> - Wyłączony<br>";
}
}
$text .= "<br>";
$l++;
}
$text .= "<br>Kliknij na wybrany serwer aby nas słuchać.";
$text = "<div align=center>" . $text . "</div>";
print $text;
?>[/php:1:017d4ebed1]
Na localhost dziala ale na lycosie gdzie w bloku menu w JPortal umeiscilem nie chce dzialac...pojawia sie ze server wylaczony chociarz i na localhost pokazuje ze wlaczony i ogolnie jest wlaczony...przecierz lycos nie ma blokady na funkcje fopen() itp...
Pomozcie mi...