Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 6 of 6

Thread: Radio stats

  1. #1
    Join Date
    Mar 2007
    Location
    Great Yarmouth, United Kingdom
    Posts
    49
    Tokens
    0
    Habbo
    DJ-Whoeva

    Default Radio stats

    anyone know where i can get stats for free and change the font to what ever i want because the stats i have at the moment wont let me change the font.
    Alex

  2. #2
    ScottDiamond Guest

    Default

    Post the source code and tell me what font you want it changed me, I'll do it for you.

  3. #3
    Join Date
    Mar 2007
    Location
    Great Yarmouth, United Kingdom
    Posts
    49
    Tokens
    0
    Habbo
    DJ-Whoeva

    Default

    HTML Code:
    <?php
    /***************************************************************************
     *                                stats.php
     *                            -------------------
     *   begin                : Sunday, Aug 21, 2006
     *   owner                : AtomicOxide.co.uk - Dave
     *   email                : [email protected]
     *
     *
     ***************************************************************************/
    /***************************************************************************
     *
     *   This program is a free script; you can redistribute it and/or modify
     *   it under the terms of the GNU General Public License as published by
     *   the Free Software Foundation; either version 2 of the License, or
     *   (at your option) any later version.
     *
     ***************************************************************************/
    /////////////////////////////////////////////////////////////////////////////
    # DO NOT EDIT BELOW THIS LIME.                                              #
    /////////////////////////////////////////////////////////////////////////////
    include ("includes/config.php");
    $timeout='6';
    $listenlink='http://'.$radiohost.':'.$radioport.'/listen.pls';
    $radio=fsockopen("$radiohost", $radioport, &$errno, &$errstr, $timeout);
    if(!$radio){
     $success='2'; 
     echo $radioofflinemsg; // Radio is offline, so display message
     die();
    }
    //Connect to the server
    if($success!='2'){ //If Connection
     fputs($radio,"Get /7.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); //Get 7.HTML
     while(!feof($radio)){
      $page.=fgets($radio, 1000);
     }
     $page=ereg_replace(".*<body>", "", $page);
     $page=ereg_replace("</body>.*", ",", $page);
     $numbers=explode(",",$page);
     $currentlisteners=$numbers[0];
     $connected=$numbers[1];
     //Open Connection
     $fp=fsockopen("$radiohost", $radioport, &$errno, &$errstr, 3);
     if(!$fp){ //If Connection
      $success2='2';
      echo "The Radio Server Is Currently Offline";
     }
     if($success2!='2'){ //If Connected
     fputs($fp,"Get /admin.cgi?pass=$radiopassword&mode=viewxml HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); 
     while(!feof($fp)){
      $page.= fgets($fp, 1000);
     }
     $security=explode(",",$page);
     $security=explode("401",$security[7]);
     $u='0';
     while($security[$u]!=""){
      if($security[1]!=''){
       die("Incorrect Server Password");
      }
     $u++;
    }
    //Array
    $loop=array("AVERAGETIME", "SERVERGENRE", "SERVERURL", "SERVERTITLE", "SONGTITLE", "SONGURL", "IRC", "ICQ", "AIM", "WEBHITS", "STREAMHITS", "INDEX", "LISTEN", "PALM7", 
    "LOGIN", "LOGINFAIL", "PLAYED", "COOKIE", "ADMIN", "UPDINFO", "KICKSRC", "KICKDST", "UNBANDST", "BANDST", "VIEWBAN", "UNRIPDST", "VIEWRIP", "VIEWXML", 
    "VIEWLOG", "INVALID"); //Define All The Variables To Get (Delete Any Ones You Don't Want)
    $y='0';
    while($loop[$y]!=''){
     $pageed=ereg_replace(".*<$loop[$y]>", "", $page); //Extract Data
     $phpname=strtolower($loop[$y]);
     $$phpname=ereg_replace("</$loop[$y]>.*", "", $pageed); //Finish Extracting Data
     if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE)
      $$phpname=urldecode($$phpname);
      $phpname = $phpname;
      $y++;
     }
    }
    if($connected=='1')
     $wordconnected="yes"; 
    else 
     $wordconnected="no"; 
     $peaklisteners=$numbers[2]; 
     $maxlisteners=$numbers[3]; 
     $reportedlisteners=$numbers[4]; 
     $song=$numbers[6];
     $bitrate=$numbers[5];
     $site=explode(" ", $servertitle);
     $title=explode("DJ",$servertitle); 
    if($wordconnected=="no" && $connected=="0")
    {
     echo $radioofflinemsg;
    }else{
     echo"<div align=\"center\">
     <table align=\"center\">
     <tr>
     <td align=\"center\">
     <a href=\"http://$serverurl\">$servertitle</a>
     </td>
     </tr>
     <tr>
     <td align=\"center\">
     <center>$reportedlisteners/$maxlisteners Listeners<br />Bitrate: ".$bitrate."Kbps<p>
     Current Song: <br />$numbers[6]</p>
     </td>
     </tr>
     <tr>
     <td align=\"center\">
     <a href=$listenlink></a>
     </td>
     </tr>
     <tr>
     <td align=\"center\"><br />
     <object id=\"MediaPlayer\" type=\"application/x-oleobject\" height=\"40\" standby=\"Please wait while we start the radio!\" width=\"170\" classid=\"CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6\">
     <param NAME=\"URL\" ref value=\"http://$radiohost:$radioport\">
     <param NAME=\"rate\" value=\"1\">
     <param NAME=\"balance\" value=\"0\">
     <param NAME=\"currentPosition\" value=\"0\">
     <param NAME=\"defaultFrame\" value>
     <param NAME=\"playCount\" value=\"1\">
     <param NAME=\"autoStart\" value=\"0\">
     <param NAME=\"currentMarker\" value=\"0\">
     <param NAME=\"invokeURLs\" value=\"-1\">
     <param NAME=\"baseURL\" value>
     <param NAME=\"volume\" value=\"100\">
     <param NAME=\"mute\" value=\"0\">
     <param NAME=\"uiMode\" value=\"mini\">
     <param NAME=\"stretchToFit\" value=\"1\">
     <param NAME=\"windowlessVideo\" value=\"0\">
     <param NAME=\"enabled\" value=\"-1\">
     <param NAME=\"enableContextMenu\" value=\"-1\">
     <param NAME=\"fullScreen\" value=\"0\">
     <param NAME=\"SAMIStyle\" value>
     <param NAME=\"SAMILang\" value>
     <param NAME=\"SAMIFilename\" value>
     <param NAME=\"captioningID\" value>
     <param NAME=\"enableErrorDialogs\" value=\"0\">
     <param NAME=\"_cx\" value=\"4763\">
     <param NAME=\"_cy\" value=\"1058\">
     </object>
     </td></tr>
     </table>
     </div>
     ";
     //Close Connection
     fclose($radio);
     }
    }
    /////////////////////////////////////////////////////////////////////////////
    # Atomic Network Productions                                                #
    /////////////////////////////////////////////////////////////////////////////
    ?>
    I want Verdana and size is 1 (to cpanel)
    Last edited by DJ-Whoeva; 14-04-2007 at 09:31 AM.
    Alex

  4. #4
    ScottDiamond Guest

    Default

    PHP Code:
    <?php
    /***************************************************************************
     *                                stats.php
     *                            -------------------
     *   begin                : Sunday, Aug 21, 2006
     *   owner                : AtomicOxide.co.uk - Dave
     *   email                : [email protected]
     *
     *
     ***************************************************************************/
    /***************************************************************************
     *
     *   This program is a free script; you can redistribute it and/or modify
     *   it under the terms of the GNU General Public License as published by
     *   the Free Software Foundation; either version 2 of the License, or
     *   (at your option) any later version.
     *
     ***************************************************************************/
    /////////////////////////////////////////////////////////////////////////////
    # DO NOT EDIT BELOW THIS LIME.                                              #
    /////////////////////////////////////////////////////////////////////////////
    include ("includes/config.php");
    $timeout='6';
    $listenlink='http://'.$radiohost.':'.$radioport.'/listen.pls';
    $radio=fsockopen("$radiohost"$radioport, &$errno, &$errstr$timeout);
    if(!
    $radio){
     
    $success='2'
     echo 
    $radioofflinemsg// Radio is offline, so display message
     
    die();
    }
    //Connect to the server
    if($success!='2'){ //If Connection
     
    fputs($radio,"Get /7.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); //Get 7.HTML
     
    while(!feof($radio)){
      
    $page.=fgets($radio1000);
     }
     
    $page=ereg_replace(".*<body>"""$page);
     
    $page=ereg_replace("</body>.*"","$page);
     
    $numbers=explode(",",$page);
     
    $currentlisteners=$numbers[0];
     
    $connected=$numbers[1];
     
    //Open Connection
     
    $fp=fsockopen("$radiohost"$radioport, &$errno, &$errstr3);
     if(!
    $fp){ //If Connection
      
    $success2='2';
      echo 
    "The Radio Server Is Currently Offline";
     }
     if(
    $success2!='2'){ //If Connected
     
    fputs($fp,"Get /admin.cgi?pass=$radiopassword&mode=viewxml HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); 
     while(!
    feof($fp)){
      
    $page.= fgets($fp1000);
     }
     
    $security=explode(",",$page);
     
    $security=explode("401",$security[7]);
     
    $u='0';
     while(
    $security[$u]!=""){
      if(
    $security[1]!=''){
       die(
    "Incorrect Server Password");
      }
     
    $u++;
    }
    //Array
    $loop=array("AVERAGETIME""SERVERGENRE""SERVERURL""SERVERTITLE""SONGTITLE""SONGURL""IRC""ICQ""AIM""WEBHITS""STREAMHITS""INDEX""LISTEN""PALM7"
    "LOGIN""LOGINFAIL""PLAYED""COOKIE""ADMIN""UPDINFO""KICKSRC""KICKDST""UNBANDST""BANDST""VIEWBAN""UNRIPDST""VIEWRIP""VIEWXML"
    "VIEWLOG""INVALID"); //Define All The Variables To Get (Delete Any Ones You Don't Want)
    $y='0';
    while(
    $loop[$y]!=''){
     
    $pageed=ereg_replace(".*<$loop[$y]>"""$page); //Extract Data
     
    $phpname=strtolower($loop[$y]);
     $
    $phpname=ereg_replace("</$loop[$y]>.*"""$pageed); //Finish Extracting Data
     
    if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE)
      $
    $phpname=urldecode($$phpname);
      
    $phpname $phpname;
      
    $y++;
     }
    }
    if(
    $connected=='1')
     
    $wordconnected="yes"
    else 
     
    $wordconnected="no"
     
    $peaklisteners=$numbers[2]; 
     
    $maxlisteners=$numbers[3]; 
     
    $reportedlisteners=$numbers[4]; 
     
    $song=$numbers[6];
     
    $bitrate=$numbers[5];
     
    $site=explode(" "$servertitle);
     
    $title=explode("DJ",$servertitle); 
    if(
    $wordconnected=="no" && $connected=="0")
    {
     echo 
    $radioofflinemsg;
    }else{
     echo
    "<font face="Verdana" size="1"><div align=\"center\">
     <table align=\"center\">
     <tr>
     <td align=\"center\">
     <a href=\"http://
    $serverurl\"><b>Current DJ:</b> $servertitle</a>
     </td>
     </tr>
     <tr>
     <td align=\"center\">
     <center><b>Listners:</b> 
    $reportedlisteners/$maxlisteners<p>
     <b>Current Song:</b> <br />
    $numbers[6]</p>
     </td>
     </tr>
     <tr>
     <td align=\"center\">
     <a href=
    $listenlink></a>
     </td>
     </tr>
     <tr>
     <td align=\"center\"><br />
     <object id=\"MediaPlayer\" type=\"application/x-oleobject\" height=\"40\" standby=\"Loading...\" width=\"170\" classid=\"CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6\">
     <param NAME=\"URL\" ref value=\"http://
    $radiohost:$radioport\">
     <param NAME=\"rate\" value=\"1\">
     <param NAME=\"balance\" value=\"0\">
     <param NAME=\"currentPosition\" value=\"0\">
     <param NAME=\"defaultFrame\" value>
     <param NAME=\"playCount\" value=\"1\">
     <param NAME=\"autoStart\" value=\"0\">
     <param NAME=\"currentMarker\" value=\"0\">
     <param NAME=\"invokeURLs\" value=\"-1\">
     <param NAME=\"baseURL\" value>
     <param NAME=\"volume\" value=\"100\">
     <param NAME=\"mute\" value=\"0\">
     <param NAME=\"uiMode\" value=\"mini\">
     <param NAME=\"stretchToFit\" value=\"1\">
     <param NAME=\"windowlessVideo\" value=\"0\">
     <param NAME=\"enabled\" value=\"-1\">
     <param NAME=\"enableContextMenu\" value=\"-1\">
     <param NAME=\"fullScreen\" value=\"0\">
     <param NAME=\"SAMIStyle\" value>
     <param NAME=\"SAMILang\" value>
     <param NAME=\"SAMIFilename\" value>
     <param NAME=\"captioningID\" value>
     <param NAME=\"enableErrorDialogs\" value=\"0\">
     <param NAME=\"_cx\" value=\"4763\">
     <param NAME=\"_cy\" value=\"1058\">
     </object>
     </td></tr>
     </table>
     </div></font>
     "
    ;
     
    //Close Connection
     
    fclose($radio);
     }
    }
    /////////////////////////////////////////////////////////////////////////////
    # Atomic Network Productions                                                #
    /////////////////////////////////////////////////////////////////////////////
    ?>
    Any problems, message me.

  5. #5
    Join Date
    Mar 2007
    Location
    Great Yarmouth, United Kingdom
    Posts
    49
    Tokens
    0
    Habbo
    DJ-Whoeva

    Default

    ok i wont be able to no till the cpanel comes bak on my hosting people ty though
    Alex

  6. #6
    Join Date
    Mar 2007
    Location
    Earth, sometimes...
    Posts
    136
    Tokens
    0

    Default

    PHP Code:
     <?php
    /***************************************************************************
     *                                stats.php
     *                            -------------------
     *   begin                : Sunday, Aug 21, 2006
     *   owner                : AtomicOxide.co.uk - Dave
     *   email                : [email protected]
     *
     *
     ***************************************************************************/
    /***************************************************************************
     *
     *   This program is a free script; you can redistribute it and/or modify
     *   it under the terms of the GNU General Public License as published by
     *   the Free Software Foundation; either version 2 of the License, or
     *   (at your option) any later version.
     *
     ***************************************************************************/
    /////////////////////////////////////////////////////////////////////////////
    # DO NOT EDIT BELOW THIS LIME.                                              #
    /////////////////////////////////////////////////////////////////////////////
    include ("includes/config.php");
    $timeout='6';
    $listenlink='http://'.$radiohost.':'.$radioport.'/listen.pls';
    $radio=fsockopen("$radiohost"$radioport, &$errno, &$errstr$timeout);
    if(!
    $radio){
     
    $success='2'
     echo 
    $radioofflinemsg// Radio is offline, so display message
     
    die();
    }
    //Connect to the server
    if($success!='2'){ //If Connection
     
    fputs($radio,"Get /7.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); //Get 7.HTML
     
    while(!feof($radio)){
      
    $page.=fgets($radio1000);
     }
     
    $page=ereg_replace(".*<body>"""$page);
     
    $page=ereg_replace("</body>.*"","$page);
     
    $numbers=explode(",",$page);
     
    $currentlisteners=$numbers[0];
     
    $connected=$numbers[1];
     
    //Open Connection
     
    $fp=fsockopen("$radiohost"$radioport, &$errno, &$errstr3);
     if(!
    $fp){ //If Connection
      
    $success2='2';
      echo 
    "The Radio Server Is Currently Offline";
     }
     if(
    $success2!='2'){ //If Connected
     
    fputs($fp,"Get /admin.cgi?pass=$radiopassword&mode=viewxml HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); 
     while(!
    feof($fp)){
      
    $page.= fgets($fp1000);
     }
     
    $security=explode(",",$page);
     
    $security=explode("401",$security[7]);
     
    $u='0';
     while(
    $security[$u]!=""){
      if(
    $security[1]!=''){
       die(
    "Incorrect Server Password");
      }
     
    $u++;
    }
    //Array
    $loop=array("AVERAGETIME""SERVERGENRE""SERVERURL""SERVERTITLE""SONGTITLE""SONGURL""IRC""ICQ""AIM""WEBHITS""STREAMHITS""INDEX""LISTEN""PALM7"
    "LOGIN""LOGINFAIL""PLAYED""COOKIE""ADMIN""UPDINFO""KICKSRC""KICKDST""UNBANDST""BANDST""VIEWBAN""UNRIPDST""VIEWRIP""VIEWXML"
    "VIEWLOG""INVALID"); //Define All The Variables To Get (Delete Any Ones You Don't Want)
    $y='0';
    while(
    $loop[$y]!=''){
     
    $pageed=ereg_replace(".*<$loop[$y]>"""$page); //Extract Data
     
    $phpname=strtolower($loop[$y]);
     $
    $phpname=ereg_replace("</$loop[$y]>.*"""$pageed); //Finish Extracting Data
     
    if($loop[$y]==SERVERGENRE || $loop[$y]==SERVERTITLE || $loop[$y]==SONGTITLE)
      $
    $phpname=urldecode($$phpname);
      
    $phpname $phpname;
      
    $y++;
     }
    }
    if(
    $connected=='1')
     
    $wordconnected="yes"
    else 
     
    $wordconnected="no"
     
    $peaklisteners=$numbers[2]; 
     
    $maxlisteners=$numbers[3]; 
     
    $reportedlisteners=$numbers[4]; 
     
    $song=$numbers[6];
     
    $bitrate=$numbers[5];
     
    $site=explode(" "$servertitle);
     
    $title=explode("DJ",$servertitle); 
    if(
    $wordconnected=="no" && $connected=="0")
    {
     echo 
    $radioofflinemsg;
    }else{
     echo
    "<font face=\"Verdana\" size=\"1\"><div align=\"center\">
     <table align=\"center\">
     <tr>
     <td align=\"center\">
     <a href=\"http://
    $serverurl\"><b>Current DJ:</b> $servertitle</a>
     </td>
     </tr>
     <tr>
     <td align=\"center\">
     <center><b>Listners:</b> 
    $reportedlisteners/$maxlisteners<p>
     <b>Current Song:</b> <br />
    $numbers[6]</p>
     </td>
     </tr>
     <tr>
     <td align=\"center\">
     <a href=
    $listenlink></a>
     </td>
     </tr>
     <tr>
     <td align=\"center\"><br />
     <object id=\"MediaPlayer\" type=\"application/x-oleobject\" height=\"40\" standby=\"Loading...\" width=\"170\" classid=\"CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6\">
     <param NAME=\"URL\" ref value=\"http://
    $radiohost:$radioport\">
     <param NAME=\"rate\" value=\"1\">
     <param NAME=\"balance\" value=\"0\">
     <param NAME=\"currentPosition\" value=\"0\">
     <param NAME=\"defaultFrame\" value>
     <param NAME=\"playCount\" value=\"1\">
     <param NAME=\"autoStart\" value=\"0\">
     <param NAME=\"currentMarker\" value=\"0\">
     <param NAME=\"invokeURLs\" value=\"-1\">
     <param NAME=\"baseURL\" value>
     <param NAME=\"volume\" value=\"100\">
     <param NAME=\"mute\" value=\"0\">
     <param NAME=\"uiMode\" value=\"mini\">
     <param NAME=\"stretchToFit\" value=\"1\">
     <param NAME=\"windowlessVideo\" value=\"0\">
     <param NAME=\"enabled\" value=\"-1\">
     <param NAME=\"enableContextMenu\" value=\"-1\">
     <param NAME=\"fullScreen\" value=\"0\">
     <param NAME=\"SAMIStyle\" value>
     <param NAME=\"SAMILang\" value>
     <param NAME=\"SAMIFilename\" value>
     <param NAME=\"captioningID\" value>
     <param NAME=\"enableErrorDialogs\" value=\"0\">
     <param NAME=\"_cx\" value=\"4763\">
     <param NAME=\"_cy\" value=\"1058\">
     </object>
     </td></tr>
     </table>
     </div></font>
     "
    ;
     
    //Close Connection
     
    fclose($radio);
     }
    }
    /////////////////////////////////////////////////////////////////////////////
    # Atomic Network Productions                                                #
    /////////////////////////////////////////////////////////////////////////////
    ?>
    Scott forgot to put backslashes infront of the quotes ( " ). Use this code, I fixed it.
    I like a good nap. Sometimes its the only thing getting me up in the morning.


    Selling (un)coded templates, PM me for info


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •