View Single Post
Old 19th November 2015, 14:19   #2
Major Dude
Join Date: Mar 2011
Posts: 576
The question is with which version of SHOUTcast DNAS 2 you tried the request?

In SHOUTcast DNAS v1 servers a 7.html could be accessed to get certain information about the current server instance for reporting and other usage. This 7.html was replaced by an equivalent xml response.

Some years after the start of SHOUTcast DNAS 2 the 7.html came back in the DNAS caused by many user-requests.

/7.html returns the old way from v1 also in a current build of v2

/currentsong?sid=1 returns the streamtitle of v2

/stats?sid=1 (XML response)
/stats?sid=1&json=1 (JSONP response)

I guess you are using PHP and cURL for the httprequest. If yes you could create a simple if-statement to start the request with a 2nd run with /currentsong?sid=1, when you get negative result from the 1st run.

You could also parse the provided XML stats from DNAS v2 and grab what you need or using the JSONP response if you have the chance to use Javascript.

I would suggest you to download the current build of SHOUTcast DNAS 2 and check the docs because there are many new/changed options which are not shown in the winamp wiki pages.
neralex is offline   Reply With Quote