Witam mam taki mały skrypt playlista radia i teraz jak dodać żeby zamiast 1 ,2 , 3 itp byla pokazana godzina tak jak jest na
http://www.miastomuzyki.pl/play.html?id=6 próbowałem dodać
<?php
?>
i nie dalo rady
i jeszcze jak zrobić żeby pokazywało się jakie piosenki benda grane o taka strukture zeby miec mi chodzi
poleci:
13:00 TuNutka
12:57 Tu Nutka
12:50 Tu Nutka
Za chwile: 12:49 Tu nutka
na antenie: Tu Nutka
juz polecialo
12:40 TNUTKA
12:36 nutka
itd
oto mój kod PHP
<?php
//Configuration
$scdef = "twoje radio";
//
$ip = "s2.myip.pl"; // IP LUB URL SERWERA (NIE DODAWAJ HTTP:// ANI PORTU)
$port = "9040"; // PORT SERWERA
$haslo = "iSZaDFYIO"; // HASLO SERWERA
$refreshrate = "200"; // Script/Page refresh time
$bgcolor = "#ffffff"; // page background colour, hex value, default = white, #ffffff
//End configuration
/*Skrypt by DJ_CARO*/
/*Koniec*/
header('Content-type: text/html;charset=iso-8859-2');
$scfp = @fsockopen($ip, $port, &$errno, &$errstr, 30
);
if (!$scfp)
{
echo '<font face="Verdana" size="2" color="#000000"><b> Prace nad Serwerem prosze chwilke poczekac</b></font>'; }
else
{
fputs($scfp,"GET /admin.cgi?pass=$haslo&mode=viewxml HTTP/1.0\r\nUser-Agent: SHOUTcast Song Status (Mozilla Compatible)\r\n\r\n");
{
$page .= fgets($scfp, 1000
); }
$loop = array("STREAMSTATUS", "BITRATE", "TIME"); $y=0;
while($loop[$y]!='')
{
if ($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE)
{
}
$y++;
}
$songatime = explode("<SONG>", $pageed); $r=1;
while($songatime[$r]!="")
{
$t=$r-1;
$playedat[$t] = ereg_replace(".*<PLAYEDAT>", "", $songatime[$r]); $playedat[$t] = ereg_replace("</PLAYEDAT>.*", "", $playedat[$t]);
$r++;
}
$skroc = '50';
echo'<table cellspacing="0" cellpadding="0" background="" border="0" width="442"> <tr>
<td valign="top" height="0">
<font face="Verdana" size="2" color="Black">
<p style="margin-top: 2; margin-bottom: 0"> <b>Na Antenie:</b><br><i>';echo
"$czas ->"; if (strlen($song[0
])>$skroc) { echo substr($song[0
], 0
, $skroc).'...'; } else { echo $song[0
]; } echo '</i></b></p> <p style="margin-top: 7; margin-bottom: 0"> <b>Leciało:</b></p>
<p style="margin-top: 6; margin-bottom: 0"> 1. '; if (strlen($song[1
])>$skroc) { echo substr($song[1
], 0
, $skroc).'...'; } else { echo $song[1
]; } echo '</p> <p style="margin-top: 6; margin-bottom: 0"> 2. '; if (strlen($song[2
])>$skroc) { echo substr($song[2
], 0
, $skroc).'...'; } else { echo $song[2
]; } echo '</p> <p style="margin-top: 7; margin-bottom: 0"> 3. '; if (strlen($song[3
])>$skroc) { echo substr($song[3
], 0
, $skroc).'...'; } else { echo $song[3
]; } echo '</p> <p style="margin-top: 6; margin-bottom: 0"> 4. '; if (strlen($song[4
])>$skroc) { echo substr($song[4
], 0
, $skroc).'...'; } else { echo $song[4
]; } echo '</p> <p style="margin-top: 7; margin-bottom: 0"> 5. '; if (strlen($song[5
])>$skroc) { echo substr($song[5
], 0
, $skroc).'...'; } else { echo $song[5
]; } echo '</p> <p style="margin-top: 6; margin-bottom: 0"> 6. '; if (strlen($song[6
])>$skroc) { echo substr($song[6
], 0
, $skroc).'...'; } else { echo $song[6
]; } echo '</p>
</td>
</tr>
</table>';
}
echo "<title>Teraz na Antenie Radia -> || $song[0] || jest godzina -> $czas Sluchacie radia-> $scdef </title>";
?>
Refresh