Radyo kodlari sadece calan sarkiyi gosterecek sekilde ayarlanmistir umarim sorunsuz calisir host desteklemedigi icin deneme yapamadim kodlar asagidadir.
$station_name = "Radio Station Name";
$refresh = "60";
$timeout = "1";
/* ----------- Server configuration ---------- */
// Note: dikkat http:// bolumunu yazmayiniz
// Asagidaki bolume radyonuzun ip ve port nosunu yaziniz
$ip[1] = "yayin.damarfm.com";
$port[1] = "8080";
/* Relays: Below you can enter more relays / restreams / channels / competitors or anything else */
/* ----- No need to edit below this line ----- */
/* ------------------------------------------- */
$servers = count($ip);
?>
if ($refresh != "0")
{
print "\n";
}
print "$Radyomuzdaki Dinleyici Sayisi\n";
?>
$i = "1";
while($i<=$servers)
{
$fp = @fsockopen($ip[$i],$port[$i],$errno,$errstr,$timeout);
if (!$fp)
{
$listeners[$i] = "0";
$msg[$i] = "ERROR [Connection refused / Server down]";
$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('', "", $info);
$info = str_replace('', "", $info);
$stats = explode(',', $info);
if (empty($stats[1]) )
{
$listeners[$i] = "0";
$msg[$i] = "Hata [Radyo Baglanamadi]";
$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])
{
}
}
{
$listeners[$i] = "0";
$msg[$i] = " Hata [Radyo Baglanamadi]";
$error[$i] = "1";
}
}
}
$i++;
}
print " Sanatci ismi: $song[1]
";
?>