Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: padekite kaip padaryt kad matytusi eteryje kas groje ir nuotrauka matytusi

Parašė arzz2· 2011 Vas. 10 17:02:41
#1

<?php


error_reporting(0);
$scdef = "Vyksta Profilaktikos Darbai"; // Default station name to display when server or stream is down
$scip = "82.135.230.135"; // ip or url of shoutcast server (DO NOT ADD HTTP:// don't include the port)
$scport = "8000"; // port of shoutcast server
$scpass = "pass"; // password to shoutcast server
$maxusers = "500"; //Kiek vienu sykiu klausosi zmoniu

//$laida = "FM-GIRLS"; //LAIDOS PAVADINIMAS

//End configuration
error_reporting(0);
$scsuccs = NULL;
$page = NULL;
include('config_radio.php'); //you may edit this path to fit your server environment otherwise leave it alone
$scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 80);
if(!$scfp) {
$scsuccs=1;
echo''.$scdef.'';
}
if ($scsuccs != 1) {
fputs($scfp,"GET /admin.cgi?pass=$scpass&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
while(!feof($scfp)) {
$page .= fgets($scfp, 1000);
}
######################################################################################################################
/////////////////////////part 1 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//define xml elements
$loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "AIM", "ICQ");
$y=0;
while (isset($loop[$y])) {
$pageed = ereg_replace(".*<$loop[$y]>", "", $page);
$scphp = strtolower($loop[$y]);
$$scphp = ereg_replace("</$loop[$y]>.*", "", $pageed);
if (($loop[$y] == "SERVERGENRE") || ($loop[$y] == "SERVERTITLE") || ($loop[$y] == "SONGTITLE") || ($loop[$y] == "SERVERTITLE") || ($loop[$y] == "CURRENTLISTENERS") || ($loop[$y] == "ICQ") ||($loop[$y] == "AIM"))
$$scphp = urldecode($$scphp);

// uncomment the next line to see all variables
// echo'$'.$scphp.' = '.$$scphp.'';
$y++;
}
//end intro xml elements
######################################################################################################################
######################################################################################################################
/////////////////////////part 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//get song info and history
$pageed = ereg_replace(".*<SONGHISTORY>", "", $page);
$pageed = ereg_replace("<SONGHISTORY>.*", "", $pageed);
$songatime = explode("<SONG>", $pageed);
$r=1;
while (isset($songatime[$r])) {
$t=$r-1;
$playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]);
$playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
$song[$t] = ereg_replace(".*<TITLE>", "", $songatime[$r]);
$song[$t] = ereg_replace("</TITLE>.*", "", $song[$t]);
$song[$t] = urldecode($song[$t]);
$dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
$dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
}
$daina = str_replace('_',' ',substr ($song[0],0,90));
$laida = str_replace('_',' ',substr ($icq[0],0,90));
//end song info

fclose($scfp);
}

//display stats
if($streamstatus == "1"){
switch ($aim) {
case 'Serveris': $aimlogo = "Serveris"; break;
case '': $aimlogo = ""; break;
case '': $aimlogo = ""; break;
case '': $aimlogo = ""; break;
case '': $aimlogo = ""; break;
case '': $aimlogo = ""; break;

case 'Modukas;**': $aimlogo = ""; break;
case '': $aimlogo = ""; break;
case '': $aimlogo = ""; break;
case '': $aimlogo = ""; break;
case '': $aimlogo = ""; break;
case '': $aimlogo = ""; break;
case '': $aimlogo = ""; break;
case '': $aimlogo = ""; break;
case '': $aimlogo = ""; break;

default: $aimlogo = "dj";
}
$_SESSION['djus'] = $aim;
echo'

<table cellpadding="0" cellspacing="0">
<tr>

<td height="100" width="90" style="padding-left:10px;">
<a href="http://www.tipofm.lt/radio/'.$aimlogo.'.gif"><img border="0" src="http://www.tipofm.lt/radio/'.$aimlogo.'.gif" height="90" border="0" title="Spausk, kad padidinti"></a>
</td>

<td style="padding-left:10px;"><b>Eteryje:</b> <span style="font-size:10px;"><b>'.$aim.'</b></span><br /><br />

<b>Laida:</b> <span style="font-size:10px;"><b>'.$icq.'</b></span>


</td>
</tr>
</table>

<table cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="center" style="padding-bottom:5px; padding-top:5px;"><MARQUEE SCROLLDELAY="2" SCROLLAMOUNT="1">

'.$daina.'<br /><br />
</MARQUEE>

</td>
</tr>


</table>';
}
if($streamstatus == "0")
{
echo"Serveris laikinai neveikia";
}


?>

Redagavo arzz2· 2011 Vas. 10 17:02:42