ok heres my code what do i have to do to get 30 songs in the history?
<?php
// Shoutcast Server Stats
// Parses shoutcasts xml to make an effective stats thing for any website
// hardcore coded by daniel brown aka xbrowniex ©www.gmtt.co.uk 2003.
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.' is Offline';
}
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");
$y=0;
while($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)
$$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($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]);
$r++;
}
//end song info
fclose($scfp);
}
//display stats
if($streamstatus == "1"){
//you may edit the html below, make sure to keep variable intact
echo'
<HTML>
<HEAD>
<TITLE>WiKKiD NeTworK</TITLE>
</HEAD><div align="center">
<BODY >
<table>
<td colspan="3"><font color="#990000">
<b>Past Songs:</b><br><br>
<b> 1.</b> '.$song[1].'<BR>
<b> 2.</b> '.$song[2].'<BR>
<b> 3.</b> '.$song[3].'<BR>
<b> 4.</b> '.$song[4].'<BR>
<b> 5.</b> '.$song[5].'<BR>
<b> 6.</b> '.$song[6].'<BR>
<b> 7.</b> '.$song[7].'<BR>
<b> 8.</b> '.$song[8].'<BR>
<b> 9.</b> '.$song[9].'<BR>
<b>10.</b> '.$song[10].'<BR>
<b>11.</b> '.$song[11].'<BR>
<b>12.</b> '.$song[12].'<BR>
<b>13.</b> '.$song[13].'<BR>
<b>14.</b> '.$song[14].'<BR>
<b>15.</b> '.$song[15].'<BR>
<b>16.</b> '.$song[16].'<BR>
<b>17.</b> '.$song[17].'<BR>
<b>18.</b> '.$song[18].'<BR>
<b>19.</b> '.$song[19].'<BR>
<b>20.</b> '.$song[20].'<BR>
<b>21.</b> '.$song[21].'<BR>
<b>22.</b> '.$song[22].'<BR>
<b>23.</b> '.$song[23].'<BR>
<b>24.</b> '.$song[24].'<BR>
<b>25.</b> '.$song[25].'<BR>
<b>26.</b> '.$song[26].'<BR>
<b>27.</b> '.$song[27].'<BR>
<b>28.</b> '.$song[28].'<BR>
<b>29.</b> '.$song[29].'<BR>
<b>30.</b> '.$song[30].'<BR></font></td>
</tr>
</table
</body>
</html>';
}
?>
<?php
// Shoutcast Server Stats
// Parses shoutcasts xml to make an effective stats thing for any website
// hardcore coded by daniel brown aka xbrowniex ©www.gmtt.co.uk 2003.
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.' is Offline';
}
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");
$y=0;
while($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)
$$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($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]);
$r++;
}
//end song info
fclose($scfp);
}
//display stats
if($streamstatus == "1"){
//you may edit the html below, make sure to keep variable intact
echo'
<HTML>
<HEAD>
<TITLE>WiKKiD NeTworK</TITLE>
</HEAD><div align="center">
<BODY >
<table>
<td colspan="3"><font color="#990000">
<b>Past Songs:</b><br><br>
<b> 1.</b> '.$song[1].'<BR>
<b> 2.</b> '.$song[2].'<BR>
<b> 3.</b> '.$song[3].'<BR>
<b> 4.</b> '.$song[4].'<BR>
<b> 5.</b> '.$song[5].'<BR>
<b> 6.</b> '.$song[6].'<BR>
<b> 7.</b> '.$song[7].'<BR>
<b> 8.</b> '.$song[8].'<BR>
<b> 9.</b> '.$song[9].'<BR>
<b>10.</b> '.$song[10].'<BR>
<b>11.</b> '.$song[11].'<BR>
<b>12.</b> '.$song[12].'<BR>
<b>13.</b> '.$song[13].'<BR>
<b>14.</b> '.$song[14].'<BR>
<b>15.</b> '.$song[15].'<BR>
<b>16.</b> '.$song[16].'<BR>
<b>17.</b> '.$song[17].'<BR>
<b>18.</b> '.$song[18].'<BR>
<b>19.</b> '.$song[19].'<BR>
<b>20.</b> '.$song[20].'<BR>
<b>21.</b> '.$song[21].'<BR>
<b>22.</b> '.$song[22].'<BR>
<b>23.</b> '.$song[23].'<BR>
<b>24.</b> '.$song[24].'<BR>
<b>25.</b> '.$song[25].'<BR>
<b>26.</b> '.$song[26].'<BR>
<b>27.</b> '.$song[27].'<BR>
<b>28.</b> '.$song[28].'<BR>
<b>29.</b> '.$song[29].'<BR>
<b>30.</b> '.$song[30].'<BR></font></td>
</tr>
</table
</body>
</html>';
}
?>
Comment