View Full Version : PHP Script for multiple SHOUTcast servers
5th October 2006, 17:25
Heres a free script that I made that allows you to get the listener number from as many SHOUTcast servers as you like.
It also includes a simple bar chart for each server showing how full it is (hover your mouse over the bar to see percentage) and tells you when there has been an error (server offline or no source)
No more checking each relay to see how many listeners you have - hope someone finds it useful...
Click here to see a demo (http://www.bellonline.co.uk/web-services/free/scripts/shoutcast-multi-server-stats/demo.php)
Click here to download the file (http://www.bellonline.co.uk/download.php?file=4)
5th October 2006, 18:26
5th October 2006, 18:44
Wery useful staff, thanx.
8th October 2006, 17:50
That's a cool script.
I have just one question.
How do I change the color of the bar.gif?
I change the script a little to my needs.
I use a orange background in the listeners graph and the bar.gif is also in that color and a little hard to read/see.
Have a look.
If you use Firefox you see only a text and no bar.gif!
9th October 2006, 10:18
Glad people are finding the script useful :)
9th October 2006, 17:39
:up: but still don't know how to change the color of the bar.gif.
13th October 2006, 10:36
Yes, the bar image is just a 1x1 pixel balck gif image - just change the colour of that. There is also a red one for when the server is at 100% capacity.
13th October 2006, 12:51
I simply create a bar.gif file and stored that one in the same server folder where the php script is stored.
Worked perfect now.
13th October 2006, 13:02
does this script keep a log? that would be great to keep tabs on which servers are most popular or your compeition :)
13th October 2006, 13:10
It doesn't but it would be easy to do.
It would just mean logging the info to a database and setting a cron to run the script every x minutes.
I have done a script that gets info from 7.html and logs it, so I might stick the two scripts together at some point.
For long term stats logging, I think Shoutstats (http://www.glop.org/shoutstats/) is probably a better option.
21st October 2006, 13:52
i've been using this to take snapshots of my competition throughout the day and night to see how we are doing. I had a thought though, I can't tell what they are playing or doing, is there a way to switch it so that the script will show what song is playing on each one?
21st October 2006, 13:58
The script is designed mainly for monitoring your own relays, hence only getting the title from your first server, but that should be easy enough.
If you find the html code for the table (around lines 189-200) just put <?php print song[$i]; ?> where you want the song to appear.
I haven't tested it but that should work.
5th November 2006, 06:17
Where do you put the file to get this to work.....sorry...im kind of new to this...
5th November 2006, 12:47
Hi, all you need to do is download the script and extract the files, edit the servers in multi-server-stats.php and upload it to your webspace.
5th November 2006, 21:47
thanks BELLonline great script :)
edit: oh its you gav ;) well done
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.