Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/05/2010, 10:41
SeaPirates
 
Fecha de Ingreso: enero-2009
Ubicación: España
Mensajes: 786
Antigüedad: 15 años, 3 meses
Puntos: 9
Script Shoucast stats

Tengo un script php donde mstro los stats de la radio , intento mostrar el nombre del DJ, pero en lugar de msotrar el nombre muestra esto:

12743802261274379976127437910212743789611274378724 127437867012743783611274378361

Lo pongo así:
'.$dj[0].' Y entonces es cuando mustra esos numeros, el script es este:

Código PHP:
<?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.
// 
// Modified for StreamSolutions, by Ramie, email [email protected], bo updates will be provided
// please refer to original authors website http://www.gmtt.co.uk for original script updates or support.
// By Megacamillo Modificado por hugohp 


//*********** INFO DE LA RADIO AQUI!! ***********//
//Configuration
$scdef  =       "";   //Nombre de la radio
$scip   =       "";           // Ip de la radio
$scport =       "";         // PUERTO DE LA RADIO
$scpass =       "";       // Password
$refresh =  "10";                       //TIEMPO DE REFRESCO
$bgcolor =      "White";                  // COLOR DEL BACKGROUND EN HEXAGECIMAL
//*********** FIN CONFIGURACION ***********//
$scfp fsockopen("$scip"$scport, &$errno, &$errstr30);
 if(!
$scfp) {
  
$scsuccs=1;
echo
'
'
;
 }
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($scfp1000);
 }
 
######################################################################################################################
//define ELEMENTOS DEL ESTATUS
 
$loop = array("AVERAGETIME""STREAMSTATUS""STREAMHITS""BITRATE""SERVERTITLE""WEBHITS""SERVERGENRE""SERVERURL""CURRENTLISTENERS""MAXLISTENERS");
 
$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);

// VARIABLES
//echo'$'.$scphp.' = '.$$scphp.'<br>';
  
$y++;
 }
//FIN XML
######################################################################################################################
######################################################################################################################
/////2###PARTE##//
//Info de las canciones
 
$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++;
 }
//FIN///

fclose($scfp);
}

//ECHOS DEL STATUS//
if($streamstatus == "1"){
//SE PUEDE EDITAR EL HTML PERO LAS VARIABLES INTACTAS//
echo