Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: PAGALBOS

Parašė Dawnet· 2013 Kov. 8 17:03:01
#8


<?php
$adresas = "xx.xx.xx.xx";
$portas = "8030";
$daina = "%daina"; 
$laida = "%laida"; 
$onair = "%dj"; 
$stilius = "";
$sludm1435 = stream_context_create(
array(
'http'=>array(
'method'=>"GET",
'header'=>"GET /eteris.htm HTTP/1.0\r\n".
"Cookie: foo=bar\r\n".
"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash\r\n".
"Accept-Language: pl,en-us;q=0.5\r\n".
"Accept-Encoding: gzip, deflate\r\n".
"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)\r\n".
"Host: seb.sleepbot.com\r\n".
"Connection: Closed\r\n",
'timeout'=>"1"
)
)
);
 
$sludm1362 = @file_get_contents('http://'.$adresas.':'.$portas.'/', 0, $sludm1435);
if(!$sludm1362) {
$onair = "Serveris nedirba";
$laida = "";
$daina = "";
} else {
$sludm1745 = strpos($sludm1362, "kbps with <B>")+13;
$sludm1244 = strpos($sludm1362, " listeners")-$sludm1745;
$sludm = explode(" of ", substr($sludm1362, $sludm1745, $sludm1244));
$stilius = @str_replace("%klauso", $sludm[0], $stilius);
$stilius = @str_replace("%viso", $sludm[1], $stilius);
$sludm1745 = strpos($sludm1362, "Stream ICQ:")+105;
$sludm1244 = strpos($sludm1362, "Stream AIM:")-$sludm1745-63;
$sludm = explode('">', substr($sludm1362, $sludm1745, $sludm1244));
$laida = @str_replace("%laida", $sludm[1], $laida);
$sludm1745 = strpos($sludm1362, "Stream AIM:")+80;
$sludm1244 = strpos($sludm1362, "Stream IRC:")-$sludm1745-63;
$sludm = explode('">', substr($sludm1362, $sludm1745, $sludm1244));
$onair = @str_replace("%dj", $sludm[1], $onair);
$sludm1745 = strpos($sludm1362, "Current Song:")+53;
$sludm1244 = strpos($sludm1362, "Written by Stephen")-$sludm1745-205;
$daina = @str_replace("%daina", substr($sludm1362, $sludm1745, $sludm1244), $daina);
echo $stilius;
}
 
?>


Cia radijo paneles scriptas kaip padaryti kad rodytu kad jis on?