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

Parašė FanatiC· 2009 Vas. 3 14:02:59
#1

Blecha niekaip neeina itaisyti radio info kad rodytu tik Klausytojus ir klausyti img seip taip padariau bet vistiek kazkox bb istampo visa theme galit istaysti? busiu labai dekingas stai kodas:
@openside("Klausyti");

error_reporting(0);
$scdef = "Šiuo metu radija yra."; // Default station name to display when server or stream is down
$scip = "82.135.230.57"; // ip or url of shoutcast server (DO NOT ADD HTTP:// don't include the port)
$scport = "8020"; // port of shoutcast server
$scpass = "..."; // password to shoutcast server
//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, 30);
if(!$scfp) {
$scsuccs=1;
echo''.$scdef.'išjungta';
}

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, 100);
}
######################################################################################################################
/////////////////////////part 1 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//define xml elements
$loop = array("STREAMSTATUS", "BITRATE", "SERVERTITLE", "CURRENTLISTENERS", "AIM");
$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] == "AIM"))
$$scphp = urldecode($$scphp);

// uncomment the next line to see all variables
// echo'$'.$scphp.' = '.$$scphp.'<br>';
$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));
//end song info

fclose($scfp);
}

//Eterio Foto
if($streamstatus == "1"){
switch ($aim) {
case 'Dj Dede': $aimlogo = "Dede"; break;
case 'dJ BaNgIs': $aimlogo = "BaNgIs"; break;
case 'Dj Montis': $aimlogo = "Montis"; break;
case 'Dj': $aimlogo = "foto pavadinimas"; break;
case 'Dj': $aimlogo = "foto pavadinimas"; break;
case 'Dj': $aimlogo = "foto pavadinimas"; break;
default: $aimlogo = "dj";
}
$_SESSION['djus'] = $aim;
echo'<div align="center">
<table cellpadding="0" cellspacing="0" width="1">
<!-- MSTaašype="nolayout" -->
<tr>
<td height="50" bgcolor="">
<p align="center">
<a href="http://82.135.230.57:8020/listen.pls"><img border="0" src="http://img520.imageshack.us/img520/3645/1590104514xc6.png/"></a></td>
</tr>
<tr>
<td height="17" valign="bottom" bgcolor="">
<div align="center">
<table cellpadding="0" cellspacing="0" width="150">
<tr>
<td height="50">
<p align="center">
<center>
<font face="Tahoma" style="font-size: 15pt" color="#fffff"><b>Musu Klauso:</font>
<font face="Arial" style="font-size: 10pt" color="#ffffff"><b>'.$currentlisteners.'/300</font> </tr>


</tr>

<tr>
<td>
</td>
</tr>
</table>
</div>';
}
if($streamstatus == "0")
{
echo'<font size="2" face="tahoma" color="#6C6D7B">Šiuo metu radija yra išjungta.</font>';
}
@closetable();



Up!

Redagavo FanatiC· 2009 Vas. 3 14:02:25