more detailed stats in php file

Ask questions, request features, or just complement us about our software and services.
Post Reply
RCB
Posts: 4
Joined: Fri Feb 04, 2005 11:53 am

more detailed stats in php file

Post by RCB »

$hey there...first of all nice program :P

i have a question though
im not a php expert so i was wondering if you could help me...
i would like to have more info display about the server/stream
in the examples.php it just shows current song, listeners and past 3 songs.... what is the code for getting it to display info like server status, song title, song artist, description etc etc

i know that

Code: Select all

echo $current_song;
will display the current song

i tried

Code: Select all

$status;
i though that would display the server status but i get nothing... is there a code guide that i can use to display all the info i want??
cheers
RCB

PS. send server details is checked
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

open up the includes.php file and you will see a full list of all available variables.
- Jay
RCB
Posts: 4
Joined: Fri Feb 04, 2005 11:53 am

Post by RCB »

i have this in the include file

Code: Select all

<?php

$server[0]['ip']='blahblah';

$server[0]['type']='SHOUTcast';

$server[0]['listeners']='2';

$server[0]['max_listeners']='40';

$server[0]['bitrate']='64';

$server[0]['status']='Online';

$server[0]['desc']='My Stream Title';

$server[0]['current_song']='Various Artists - The Dreamletts - Really Now';



$current_song='Various Artists - The Dreamletts - Really Now';

$listeners='2';
$status='';

$max_listeners='40';

$touch_interval='60';

$lastsong[0]='Various Artists - The Dreamletts - Really Now';

$lasttime[0]='1107538255';

$lastsong[1]='Massive Attack - Group Four';

$lasttime[1]='1107510041';

$lastsong[2]='Massive Attack - Mezzanine';

$lasttime[2]='1107509680';

?>
but how do i apply that to the php file i wanna use....

i tried added

Code: Select all

<?php echo $status; ?> 
but nothing shows up about the status....

any help?

cheers
RCB
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

you would use

Code: Select all

<?php echo $server[0]['status']; ?>
- Jay
RCB
Posts: 4
Joined: Fri Feb 04, 2005 11:53 am

Post by RCB »

thx mate...works great!! :)

really appreciate the prompt replies :P


thanks again
RCB
euphoria
Posts: 2
Joined: Tue May 10, 2005 8:27 pm

Post by euphoria »

is there anyway to add additional variables? (streamhits, aim, icq, etc?)
User avatar
Jay
Will work for food (Administrator)
Posts: 3020
Joined: Mon Jan 14, 2002 12:48 am
Location: Next Door
Contact:

Post by Jay »

no, aim, icq etc are entries I consider to be static plus SHOUTcast specific. Streamhits is also a shoutcast specific capability. Again these are all reasons I cannot add them to Radio Toolbox.
- Jay
Post Reply