Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   Shoutcast Technical Support (http://forums.winamp.com/forumdisplay.php?f=86)
-   -   how to get metadata SHOUTCAST in PHP (http://forums.winamp.com/showthread.php?t=380537)

neves768 10th February 2015 18:33

how to get metadata SHOUTCAST in PHP
 
How to retrieve information of SHOUTCAST metadata and send to a PHP page?
Informations like Server name, music, etc...

DrO 10th February 2015 18:40

look at the documentation provided with the current DNAS 2.x release for what you can query from the DNAS (and how to query that information from the DNAS) and use that. most of that information will also apply if you're having to do this against the legacy 1.x DNAS (you have to ignore the sid parameter in such cases).

neves768 10th February 2015 19:22

How to get only stream name?
home.html?sid=Something here?

jaromanda 10th February 2015 21:13

Quote:

Originally Posted by neves768 (Post 3019027)
How to get only stream name?
home.html?sid=Something here?

as it states in the DOCUMENTATION that comes with DNAS, home.html redirects to the configured stream homepage (streamurl) - so, that wont do what you want no matter what you pass to that URL

there's no URI to get "only the stream name" as far as I can see in the DOCUMENTATION that comes with DNAS, but if you read the DOCUMENTATION, you might find something I missed, because I don't have a need for that ...

if the public pages are not disabled through the use of streamhidestats=all, you can use /stats?sid=# (where # is a NUMBER) to get XML info about the steam, including streamtitle (what you refer to as stream name I'm guessing) or /stats?sid=#&json=1 to get JSON version of the same data

if the public pages are disabled, you need to use authentication with /admin.cgi?mode=viewjson&page=1&sid=# (for JSON version) or /admin.cgi?mode=viewxml&page=1&sid=# (for XML version) or perhaps pass password=xxx to the previous examples - I'm not 100% clear on that, I think both may be valid, but it's all in the DOCUMENTATION THAT CAME WITH DNAS - so, I'm only regurgitating what I READ in that DOCUMENTATION anyway

in summary, as DrO said, "look at the documentation" - preferably read it too

neves768 24th February 2015 12:43

Thanks! I Used the public json link.

DrO 24th February 2015 18:02

Quote:

Originally Posted by jaromanda (Post 3019047)
if the public pages are disabled...

for disabled public pages, if you provide a valid password via the 'pass' parameter then you can still access the xml and json versions (so monitoring tools can still work even if you don't want other broadcasters snooping on your stats...).

neves768 27th February 2015 02:17

I'm trying to parse the xml file with php but return errors... I need to connect with user and password by php?

#EDIT
Some PHP coding and the magic is done :)

neralex 27th February 2015 08:43

Maybe that can help you, to protect yourself for flooding the php error log while parsing the xml content.

http://forums.winamp.com/showpost.ph...03&postcount=2


All times are GMT. The time now is 16:00.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.