Ice Cast Help

dj_shoshi

Registered
Здравейте нямой може ли да ми извади статистика от Shout Cast смисъл коя песен върви клко слушателя има и колко са били най много на веднъж ето ви работещ сървър http://93.152.158.153:3333/ Благодаря! :?:
 
за Ice Cast статистика ли говориш или за Shout Cast за кое точно ти трябва ?

за SHOUTcast Radio Stats или Shout Cast

за Ice Cast

Код:
<?php

$ip = "xxx.yyy.zzz";   Ип-то ти           
$port = "xxxx";             Порта ако не си го ръчкал би трябвало да е (80)
$password = "xxxx";   Паролата ти 

<p>////////////////start the parsin action\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//opening socket
$fp = fsockopen("$ip", $port, &$errno, &$errstr, 30); //open connection
if(!$fp) {
 $success=2;  //set if no connection

//edit html to fit your stations site, this display is for offline status
echo "server is offline ";
}

<p><p>if($success!=2){ //if connection
 fputs($fp,"GET http://$password@$ip:$port/admin/stats.xml"); //get stats.xml
 while(!feof($fp)) {
  $page .= fgets($fp, 1000);
 }
 
 
 $loop = array("client_connections","source_connections"); //define all the variables to get (delte any ones you don't want)
 $y=0; //dummy variable for while loop
 
  while($loop[$y]!=''){ //while there are things in loop
  $pageed = ereg_replace(".*<$loop[$y]>", "", $page); // extract data
  $phpname = strtolower($loop[$y]); //make names in loop lowercase for variable names
  $$phpname = ereg_replace("</$loop[$y]>.*", "", $pageed); //finish extracting data
  if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE) //if for code clean-up (if you have problems with variables with URL encoding (i.e. %20 for space put them in this loop)
   $$phpname = urldecode($$phpname); // replace URL code with regular text (i.e. %20 = space)
 
 ##More stuff that prints##
echo ('$'.$phpname.' = '.$$phpname.' <BR>');
 ##Stop here. Your server will be upset if you comment out the next line of code ($y++;).##

  $y++; //update dummy variable for while loop
 }
 
 fclose($fp); //close connection
 echo "$client_connection";
}

?>
 
bankera1990 каза:
за Ice Cast статистика ли говориш или за Shout Cast за кое точно ти трябва ?



за Ice Cast

Код:
<?php

$ip = "xxx.yyy.zzz";   Ип-то ти           
$port = "xxxx";             Порта ако не си го ръчкал би трябвало да е (80)
$password = "xxxx";   Паролата ти 

<p>////////////////start the parsin action\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//opening socket
$fp = fsockopen("$ip", $port, &$errno, &$errstr, 30); //open connection
if(!$fp) {
 $success=2;  //set if no connection

//edit html to fit your stations site, this display is for offline status
echo "server is offline ";
}

<p><p>if($success!=2){ //if connection
 fputs($fp,"GET http://$password@$ip:$port/admin/stats.xml"); //get stats.xml
 while(!feof($fp)) {
  $page .= fgets($fp, 1000);
 }
 
 
 $loop = array("client_connections","source_connections"); //define all the variables to get (delte any ones you don't want)
 $y=0; //dummy variable for while loop
 
  while($loop[$y]!=''){ //while there are things in loop
  $pageed = ereg_replace(".*<$loop[$y]>", "", $page); // extract data
  $phpname = strtolower($loop[$y]); //make names in loop lowercase for variable names
  $$phpname = ereg_replace("</$loop[$y]>.*", "", $pageed); //finish extracting data
  if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE) //if for code clean-up (if you have problems with variables with URL encoding (i.e. %20 for space put them in this loop)
   $$phpname = urldecode($$phpname); // replace URL code with regular text (i.e. %20 = space)
 
 ##More stuff that prints##
echo ('$'.$phpname.' = '.$$phpname.' <BR>');
 ##Stop here. Your server will be upset if you comment out the next line of code ($y++;).##

  $y++; //update dummy variable for while loop
 }
 
 fclose($fp); //close connection
 echo "$client_connection";
}

?>

не изкарва нищо ;) $client_connections =
$source_connections =
 

Back
Горе