Hola,buenas como podría poner una radio stat de habbo qé venga
-DJ-online
-La música qé pone & esas cosas
pero qé no sea de joaquin
puse ese codigo en .php & lo subo a FTP & lo subo a mi web & cuando entro me dice esto entren a
http://latino-escuela-dj.co.cc/escuelastat.php& despues entro de dj & me sigue saliendo no hay dj & la radio no está conectas :s ayudenme les doy karmas [La web tarda un poco en entrar a la web]
Un Saludo de Josue<style type="text/css">
<!--
body,td,th {
color: #FF0000;
}
-->
</style>
<?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 ramieb@ramieb.com, 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 Radio"; //Nombre de la radio
$scip = "IP Radio"; // Ip de la radio
$scport = "PORT Radio"; // PUERTO DE LA RADIO
$scpass = "Contra Radio"; // Password
$refresh = "10"; //TIEMPO DE REFRESCO
$bgcolor = "White"; // COLOR DEL BACKGROUND EN HEXAGECIMAL
//*********** FIN CONFIGURACION ***********//
$scfp = fsockopen("$scip", $scport, &$errno, &$errstr, 30);
if(!$scfp) {
$scsuccs=1;
echo'
<html>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<META HTTP-EQUIV="REFRESH" CONTENT="30">
<link rel=stylesheet href="" type="text/css">
<title>Radio Server Is Offline</title>
</head>
<body text="" bgcolor="'.$bgcolor.'">
<p align="center" style="margin-top: 0; margin-bottom: 0">
<b><font face="Verdana" size="1" color="#3299CC">No Esta la radio conectada o.O!!!!! :O</font></b></p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
<b>
<font face="Verdana" size="1" color="#3299CC"></font></b></p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
</p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
</p>
<p align="center" style="margin-top: 0; margin-bottom: 0"> </p>
<p align="center" style="margin-top: 0; margin-bottom: 0"><b>
<font color="#3232CD" face="Verdana" size="1">
<img border="0" src="images/offline.gif" ></font></b></p>
<b>
<font face="Verdana" size="1" color="#3299CC">Espera a que el proximo DJ se
conecte</font></b></p>
<p align="left" style="margin-top: 0; margin-bottom: 0">
</p>
<p align="left" style="margin-top: 0; margin-bottom: 0"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="left">
<p style="margin-top: 0; margin-bottom: 0" align="left">
</p>
<p style="margin-top: 0; margin-bottom: 0" align="center">
<marquee behavior="alternate" width="202"><font face="verdana" size="1" font color="#3299CC" class="Estilo2">
<br /><br /><b></b><br />
</marquee></p>
<p style="margin-top: 0; margin-bottom: 0" align="left"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="left"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="left"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="center">
</p>
</body>
</html>';
}
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);
}
######################################################################################################################
//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'
<html>
<head>
<style type="text/css">
<!--
.Estilo2 {font-size: 10px;font-family: Verdana}
-->
</style>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<META HTTP-EQUIV="REFRESH" CONTENT="'.$refresh.'">
<link rel=stylesheet href="" type="text/css">
<title>'.$scdef.'</title>
</head
<center>
<body text="" bgcolor="'.$bgcolor.'" >
<p style="margin-top: 0; margin-bottom: 0" align="center"> <br>
<font face="verdana" size="2" font class="Estilo2">
<img border="0" src="http://www.habbo.es/habbo-imaging/avatarimage?user='.$servergenre.'&action=wav&direction=4&head_direction=123" ><br><br>
<font face="verdana" size="2" font color="#3299CC" class="Estilo2">
<b>.:.:Dj en linea.:.:</b><br />
</font>
<font face="verdana" size="2" font class="Estilo2">
<marquee width="177"><img src="http://www.habbies.nl/img/text-gen/es/'.$servergenre.'/1/'.$servertitle.'|.gif"/></marquee>
</font>
<font face="verdana" size="2" font color="#3299CC" class="Estilo2">
<br /><br /><b>.:.:Oyentes.:.:</b><br />
</font>
<font face="verdana" size="2" font class="Estilo2">
'.$currentlisteners.' / '.$maxlisteners.'
</font>
<font face="verdana" size="2" font color="#3299CC" class="Estilo2">
<br /><br /><b>.:.:Canción Actual.:.:</b><br />
</font>
<font face="verdana" size="2" font class="Estilo2">
'.$song[0].'
</font>
<font face="verdana" size="2" font color="#3299CC" class="Estilo2">
<br> <br>
<b>.:.:Ultimas Canción.:.:</b>
</font>
<font face="verdana" size="2" font class="Estilo2">
<div align="left">
<p align="center" style="margin-top: 0; margin-bottom: 0">1.- '.$song[1].'
</font>
<font face="verdana" size="2" font color="#3299CC" class="Estilo2"><br />
<br />
<marquee behavior="alternate" width="202"><font face="verdana" size="1" font color="#3299CC" class="Estilo2">
<br /><br /><b>By Junior-R Para HF</b><br />
</marquee></p>
<br> <br>
</div>
</font>
</span>
<font face="verdana" size="2" font color="#3299CC" class="Estilo2">
<p align="center">
</p>
</font>
<center>
<p style="margin-top: 0; margin-bottom: 0">
</p>
</center>
</body></center>
</html>';
}
if($streamstatus == "0")
{
//EDITAR HTML PERO VARIABLES INTACTAS
echo'
<html>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<META HTTP-EQUIV="REFRESH" CONTENT="30">
<link rel=stylesheet href="" type="text/css">
<title>Radio Server Is Offline</title>
</head>
<body text="" bgcolor="'.$bgcolor.'">
<p align="center" style="margin-top: 0; margin-bottom: 0">
<b><font face="Verdana" size="1" color="#3299CC">No Hay Dj En Linea!!!!! :O</font></b></p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
<b>
<font face="Verdana" size="1" color="#3299CC"> :.:.::ESPERA A QUE LLEGUE UNO.:.:.:</font></b></p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
</p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
</p>
<p align="center" style="margin-top: 0; margin-bottom: 0"> </p>
<p align="center" style="margin-top: 0; margin-bottom: 0"><b>
<font color="#3232CD" face="Verdana" size="1">
<img border="0" src="images/offline.gif" ><br />
<marquee behavior="alternate" width="202"><font face="verdana" size="1" font color="#3299CC" class="Estilo2">
<br /><br /><b>By Junior-R Modificarlo a Su gusto pero Denjen los Derechos porfavor :D</b><br />
</marquee></p>
</font></b></p></b></p>
</p>
</body>
</html>';
}
?>