<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>th1nk - Latest Comments in How to pull statistics from Icecast with PHP</title><link>http://th1nk.disqus.com/</link><description>Web Concepts and Analysis </description><atom:link href="https://th1nk.disqus.com/how_to_pull_statistics_from_icecast_with_php/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 13 Nov 2008 04:58:10 -0000</lastBuildDate><item><title>Re: How to pull statistics from Icecast with PHP</title><link>http://www.th1nk.com/code/how-to-pull-statistics-from-icecast-with-php/#comment-3736577</link><description>&lt;p&gt;Oh and also, if you could help with another problem I would greatly appreciate it.&lt;br&gt;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.&lt;/p&gt;&lt;p&gt;Thanks again&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joulukka</dc:creator><pubDate>Thu, 13 Nov 2008 04:58:10 -0000</pubDate></item><item><title>Re: How to pull statistics from Icecast with PHP</title><link>http://www.th1nk.com/code/how-to-pull-statistics-from-icecast-with-php/#comment-3735413</link><description>&lt;p&gt;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 $r-&amp;gt;check_station($mountpoint) them.&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">joulukka</dc:creator><pubDate>Thu, 13 Nov 2008 04:41:47 -0000</pubDate></item><item><title>Re: How to pull statistics from Icecast with PHP</title><link>http://www.th1nk.com/code/how-to-pull-statistics-from-icecast-with-php/#comment-3056296</link><description>&lt;p&gt;I forgot to mention... I using PHP 5.2.3&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcio</dc:creator><pubDate>Tue, 14 Oct 2008 21:04:11 -0000</pubDate></item><item><title>Re: How to pull statistics from Icecast with PHP</title><link>http://www.th1nk.com/code/how-to-pull-statistics-from-icecast-with-php/#comment-3055447</link><description>&lt;p&gt;HI!&lt;/p&gt;&lt;p&gt;I can not to manage it to work. See the error... How can I fix it?&lt;/p&gt;&lt;p&gt;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/&lt;a href="http://atcbsb.com.br/icestats.php" rel="nofollow noopener" target="_blank" title="atcbsb.com.br/icestats.php"&gt;atcbsb.com.br/icestats.php&lt;/a&gt; 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/&lt;a href="http://atcbsb.com.br/icestats.php" rel="nofollow noopener" target="_blank" title="atcbsb.com.br/icestats.php"&gt;atcbsb.com.br/icestats.php&lt;/a&gt; on line 16 Warning: fsockopen(): unable to connect to &lt;a href="http://atcbsb.com:8000" rel="nofollow noopener" target="_blank" title="atcbsb.com:8000"&gt;atcbsb.com:8000&lt;/a&gt; (Connection timed out) in /local/home/mslino/&lt;a href="http://atcbsb.com.br/icestats.php" rel="nofollow noopener" target="_blank" title="atcbsb.com.br/icestats.php"&gt;atcbsb.com.br/icestats.php&lt;/a&gt; on line 16 Warning: fputs(): supplied argument is not a valid stream resource in /local/home/mslino/&lt;a href="http://atcbsb.com.br/icestats.php" rel="nofollow noopener" target="_blank" title="atcbsb.com.br/icestats.php"&gt;atcbsb.com.br/icestats.php&lt;/a&gt; on line 25 Warning: fgets(): supplied argument is not a valid stream resource in /local/home/mslino/&lt;a href="http://atcbsb.com.br/icestats.php" rel="nofollow noopener" target="_blank" title="atcbsb.com.br/icestats.php"&gt;atcbsb.com.br/icestats.php&lt;/a&gt; on line 26 Warning: fclose(): supplied argument is not a valid stream resource in /local/home/mslino/&lt;a href="http://atcbsb.com.br/icestats.php" rel="nofollow noopener" target="_blank" title="atcbsb.com.br/icestats.php"&gt;atcbsb.com.br/icestats.php&lt;/a&gt; on line 27 The requested station is currently unavailable.&lt;/p&gt;&lt;p&gt;Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcio</dc:creator><pubDate>Tue, 14 Oct 2008 20:46:58 -0000</pubDate></item><item><title>Re: How to pull statistics from Icecast with PHP</title><link>http://www.th1nk.com/code/how-to-pull-statistics-from-icecast-with-php/#comment-1602002</link><description>&lt;p&gt;Thanks for the code.&lt;/p&gt;&lt;p&gt;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&lt;/p&gt;&lt;p&gt;require_once('icestats.php');&lt;/p&gt;&lt;p&gt;in the example page to&lt;/p&gt;&lt;p&gt;include 'icestats.php';&lt;/p&gt;&lt;p&gt;Otherwise I got a 'class declared twice' error or something like that.&lt;/p&gt;&lt;p&gt;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:&lt;/p&gt;&lt;p&gt;For example, to print the current artist:&lt;/p&gt;&lt;p&gt;echo $stats-&amp;gt;artist[0];&lt;/p&gt;&lt;p&gt;Basically change 'artist' above for whatever other field your are interested in..&lt;/p&gt;&lt;p&gt;Thanks again for sharing your code - &lt;br&gt;Matt&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Ford</dc:creator><pubDate>Fri, 01 Aug 2008 06:00:58 -0000</pubDate></item><item><title>Re: How to pull statistics from Icecast with PHP</title><link>http://www.th1nk.com/code/how-to-pull-statistics-from-icecast-with-php/#comment-1602003</link><description>&lt;p&gt;hi john&lt;/p&gt;&lt;p&gt;it works very fine. now can i read all parameter in every mount point. thanks.&lt;/p&gt;&lt;p&gt;holger&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">huelgueuer</dc:creator><pubDate>Thu, 05 Jun 2008 11:56:32 -0000</pubDate></item><item><title>Re: How to pull statistics from Icecast with PHP</title><link>http://www.th1nk.com/code/how-to-pull-statistics-from-icecast-with-php/#comment-1602005</link><description>&lt;p&gt;Hey huelgueuer:&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;I'll take a look and see what I can come up with for both issues, here, and post back.&lt;/p&gt;&lt;p&gt;- John&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John Galvin</dc:creator><pubDate>Tue, 03 Jun 2008 22:15:33 -0000</pubDate></item><item><title>Re: How to pull statistics from Icecast with PHP</title><link>http://www.th1nk.com/code/how-to-pull-statistics-from-icecast-with-php/#comment-1602004</link><description>&lt;p&gt;hi&lt;/p&gt;&lt;p&gt;it works fine, but we have 5 mountpoints in the stats&lt;br&gt;/48&lt;br&gt;/96&lt;br&gt;/128&lt;br&gt;/dump&lt;br&gt;/live&lt;/p&gt;&lt;p&gt;the listeners in the script comes from /live&lt;br&gt;how can i change to /128 ?&lt;/p&gt;&lt;p&gt;and can i list ips from&lt;/p&gt;&lt;p&gt;http://......../admin/listclients.xsl?mount=/128&lt;/p&gt;&lt;p&gt;mfg&lt;/p&gt;&lt;p&gt;huelgueuer&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">huelgueuer</dc:creator><pubDate>Tue, 03 Jun 2008 21:59:58 -0000</pubDate></item></channel></rss>