@ 2013-12-15T05:15:03Z <?PHP
// Shoutcast Server Stats
// Parses shoutcasts xml to make an effective stats thing for any website
// ©2004-2005 Daniel Brown http://www.gmtt.co.uk
// Please refer to the readme file for use.
//////////////////////////////////////////////////////////////////////////////////////////////
// Dinghy Radio Stats Information
// Grabs the xml from your radio server and displays it in a iframe that refreshes every 30 seconds.
// ©Daniel Brown www.gmtt.co.uk
//////////////////////////////////////////////////////////////////////////////////////////////
//Configuracion
$scdef = "Radio Ts-H"; // Nombre de la radio por defecto, se muestra cuando el servidor esta caido
$scip = "94.23.149.176"; // ip or url del servidor shoutcast (NO AÑADIR HTTP:// No incluir el puerto)
$scport = "9996"; // Puerto del servidor shoutcast
$scpass = "tshdj"; // Contraseña del servidor to shoutcast
//Fin configuratio
$scfp = fopen("$scip", $scport, &$errno, &$errstr, 30);
if(!$scfp) {
$scsuccs=1;
$locutor = 'Sin Locutor';
$actuals = 'Sin Cancion Actual';
$canciones = '
<b>1.</b> Sin Canciones Pasadas <BR><BR>
<b>2.</b> Sin Canciones Pasadas <BR><BR>
<b>3.</b> Sin Canciones Pasadas <BR><BR>
<b>4.</b> Sin Canciones Pasadas <BR><BR>
<b>5.</b> Sin Canciones Pasadas <BR><BR>'
;
}
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]);
$dj[$t] = ereg_replace(".*<SERVERTITLE>", "", $page);
$dj[$t] = ereg_replace("</SERVERTITLE>.*", "", $pageed);
$r++;
}
//end song info
fclose($scfp);
}
//display stats
if($streamstatus == "1"){
//you may edit the html below, make sure to keep variable intact
$locutor = ''.$servertitle.'';
$actuals = ''.$song[0].'';
$canciones = '
<b>1.</b> '.$song[1].'<BR><BR>
<b>2.</b> '.$song[2].'<BR><BR>
<b>3.</b> '.$song[3].'<BR><BR>
<b>4.</b> '.$song[4].'<BR><BR>
<b>5.</b> '.$song[5].'<BR><BR>'
;
}
if($streamstatus == "0")
{
//you may edit the html below, make sure to keep variable intact
$locutor = 'Sin Locutor';
$actuals = 'Sin Cancion Actual';
$canciones = '
<b>1.</b> Sin Canciones Pasadas <BR><BR>
<b>2.</b> Sin Canciones Pasadas <BR><BR>
<b>3.</b> Sin Canciones Pasadas <BR><BR>
<b>4.</b> Sin Canciones Pasadas <BR><BR>
<b>5.</b> Sin Canciones Pasadas <BR><BR>'
;
}
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 5.4.23 0.014 0.053 12.34 5.4.22 0.014 0.038 12.34 5.4.21 0.012 0.043 12.34 5.4.20 0.014 0.041 12.34 5.4.19 0.015 0.039 12.34 5.4.18 0.014 0.040 12.33 5.4.17 0.013 0.056 12.35 5.4.16 0.010 0.046 12.34 5.4.15 0.018 0.071 12.34 5.4.14 0.013 0.037 12.02 5.4.13 0.010 0.041 12.01 5.4.12 0.013 0.039 11.96 5.4.11 0.012 0.041 11.96 5.4.10 0.013 0.041 11.96 5.4.9 0.011 0.058 11.96 5.4.8 0.012 0.039 11.96 5.4.7 0.011 0.038 11.96 5.4.6 0.013 0.038 11.96 5.4.5 0.012 0.041 11.96 5.4.4 0.012 0.037 11.95 5.4.3 0.012 0.068 11.94 5.4.2 0.012 0.040 11.94 5.4.1 0.008 0.043 11.94 5.4.0 0.018 0.049 11.44 5.3.29 0.008 0.035 12.80 5.3.28 0.013 0.043 12.71 5.3.27 0.013 0.045 12.72 5.3.26 0.018 0.068 12.72 5.3.25 0.013 0.049 12.72 5.3.24 0.022 0.079 12.72 5.3.23 0.013 0.043 12.71 5.3.22 0.011 0.042 12.68 5.3.21 0.013 0.043 12.68 5.3.20 0.012 0.042 12.68 5.3.19 0.011 0.044 12.68 5.3.18 0.022 0.062 12.67 5.3.17 0.013 0.038 12.67 5.3.16 0.011 0.041 12.67 5.3.15 0.013 0.042 12.67 5.3.14 0.012 0.040 12.66 5.3.13 0.011 0.043 12.66 5.3.12 0.012 0.042 12.66 5.3.11 0.012 0.040 12.66 5.3.10 0.012 0.057 12.12 5.3.9 0.012 0.039 12.08 5.3.8 0.008 0.043 12.08 5.3.7 0.011 0.056 12.08 5.3.6 0.010 0.041 12.06 5.3.5 0.014 0.041 12.01 5.3.4 0.013 0.041 12.01 5.3.3 0.011 0.041 11.96 5.3.2 0.013 0.040 11.74 5.3.1 0.012 0.041 11.71 5.3.0 0.008 0.046 11.69
preferences:dark mode live preview
140.81 ms | 1394 KiB | 7 Q