Community Page
- www.th1nk.com Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Oh and also, if you could help with another problem I would greatly appreciate it. icestats.php seems to produce an error - I believe - whenever the current song has scandinavian characters in its...
- How should I actually go with getting stats from all mountpoints? Because the demo expects that I just want to access /pirate-radio's stats. How do I get all the mountpoints so I can...
- I forgot to mention... I using PHP 5.2.3
- HI! I can not to manage it to work. See the error... How can I fix it? Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of...
- http://centerology.com is ffffound like, and open for registration!
th1nk
Web Concepts and Analysis
Update: I’ve refactored a good deal of the code here to support radio servers with multiple mount points. It now uses the SimpleXML functions in PHP5, so make sure you’ve got those enabled.
icestats.php
<?PHP
class icestats { ... Continue reading »
icestats.php
<?PHP
class icestats { ... Continue reading »
1 year ago
I actually haven't tested this with multiple mount points - I just threw it together for a station I run in my personal time, so let me play with it a bit and see what I can come up with.
As to the IP address listings, if you do a print_r($stats) on the array returned back from the get_parsed_stats() function, you'll see what fields you have available for output - listener count and such are available, but I don't see a way off-hand to get the IP addresses of listeners. It would probably entail parsing another one of the XML files on the server, but like I said, this was just a quick thing I threw together, so I'm not sure.
I'll take a look and see what I can come up with for both issues, here, and post back.
- John
1 year ago
it works fine, but we have 5 mountpoints in the stats
/48
/96
/128
/dump
/live
the listeners in the script comes from /live
how can i change to /128 ?
and can i list ips from
http://......../admin/listclients.xsl?mount=/128
mfg
huelgueuer
1 year ago
it works very fine. now can i read all parameter in every mount point. thanks.
holger
11 months ago
I am totally new to PHP and found that it wouldn't run at first on my hosting company's server (which is running PHP 5). I found that I needed to change the line
require_once('icestats.php');
in the example page to
include 'icestats.php';
Otherwise I got a 'class declared twice' error or something like that.
Also for those people like me who don't have a clue how to extract individual fields from the returned object, after a bit of trial and error (!) it turns out you can do it like this:
For example, to print the current artist:
echo $stats->artist[0];
Basically change 'artist' above for whatever other field your are interested in..
Thanks again for sharing your code -
Matt
8 months ago
I can not to manage it to work. See the error... How can I fix it?
Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/mslino/atcbsb.com.br/icestats.php on line 16 Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /local/home/mslino/atcbsb.com.br/icestats.php on line 16 Warning: fsockopen(): unable to connect to atcbsb.com:8000 (Connection timed out) in /local/home/mslino/atcbsb.com.br/icestats.php on line 16 Warning: fputs(): supplied argument is not a valid stream resource in /local/home/mslino/atcbsb.com.br/icestats.php on line 25 Warning: fgets(): supplied argument is not a valid stream resource in /local/home/mslino/atcbsb.com.br/icestats.php on line 26 Warning: fclose(): supplied argument is not a valid stream resource in /local/home/mslino/atcbsb.com.br/icestats.php on line 27 The requested station is currently unavailable.
Thanks!
8 months ago
7 months ago
Thanks
7 months ago
icestats.php seems to produce an error - I believe - whenever the current song has scandinavian characters in its name (like å,ä,ö). I found out that the reason is SimpleXML can only output utf-8... possibly. I was just wondering if there was some way stop this error from happening.
Thanks again