[icecast] XML statistics?

oddsock
Fri, 06 Aug 2004 14:23:44 -0000

At 12:27 AM 2/26/2004, you wrote:

>>This stats file is a sort of "virtual file", created
by icecast on
>>demand. It doesn't live on the filesystem at any point.
>>
>>You can request it from the server using
http://server:port/admin/stats.xml
>>
>>Can you suggest some text for the documentation that would clarify this?
>>
>>Mike
>Well, I still don't get an XML file when I visit that page on my
>server.  Granted, all the information that is in the file is there,
>however, I can't use PHP's nifty XML parsing tools to get that
information.

I think you are misunderstanding something. The stats XML is not accessed
via a file on the file system (I.e. you shouldn't expect to see a physical
stats.xml file).  I'm a bit confused by your statement that you don't
get
an XML file when you visit the link, but yet you also say that "all the
information that is in the file is there"...what exactly do you see when
you visit the http://server:port/admin/stats link ?
perhaps your confusion is that you dont actually need a XML file in order
to parse it in PHP....You can retrieve it via a URL call.  I think you can
do something like :

$handle = fopen("http://user:password@server:port/admin/stats",
"r");

and then proceed to parse it using PHP's XML parsing routines...and I know
there are a lot of people who actually do exactly this...

oddsock