Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Reply
Thread Tools Search this Thread Display Modes
Old 13th August 2017, 20:46   #1
JamFM69
Junior Member
 
Join Date: Aug 2017
Posts: 8
My port 8000 says it open. But it still says cannot see your station

Hi. Was hoping someone can help me.
I used to broadcast Shoutcast radio a lot about 7 years ago, but I recently thought I'd like to do it again.
I done all the port forwarding on my Sky router and when I done a check to see if my port is open I get a message back like this: Port 8000 is open on 176.25.235.68.
I used: http://www.yougetsignal.com/tools/open-ports/

So this would suggest I have successfully opened the port 8000 which is needed to broadcast. I remembered this from the last time I broad casted. Only thing has changed is I have upgraded to Windows 10 from XP.
I have been battling to sort this for 2 days now and not getting anywhere, the only error I get is:
Event log:
<08/13/17@20:34:17> [SHOUTcast] DNAS/win32 v1.9.5 (Dec 27 2004) starting up...
<08/13/17@20:34:17> [main] loaded config from C:\Program Files\SHOUTcast\sc_serv.ini
<08/13/17@20:34:17> [main] initializing (usermax:32 portbase:8000)...
<08/13/17@20:34:17> [main] No ban file found (sc_serv.ban)
<08/13/17@20:34:17> [main] No rip file found (sc_serv.rip)
<08/13/17@20:34:17> [main] opening source socket
<08/13/17@20:34:17> [main] source thread starting
<08/13/17@20:34:17> [main] opening client socket
<08/13/17@20:34:17> [main] Client Stream thread [0] starting
<08/13/17@20:34:17> [main] client main thread starting
<08/13/17@20:34:17> [source] listening for connection on port 8001
<08/13/17@20:34:25> [source] connected from 127.0.0.1
<08/13/17@20:34:26> [source] icy-name:Jam FM ; icy-genre:Rock
<08/13/17@20:34:26> [source] icy-pub:1 ; icy-br:128 ; icy-url:http://www.shoutcast.com
<08/13/17@20:34:26> [source] icy-irc:N/A ; icy-icq:0 ; icy-aim:N/A
<08/13/17@20:34:27> [dest: 37.59.25.124] starting stream (UID: 0)[L: 1]{A: SHOUTcast Directory Tester}(P: 0)
<08/13/17@20:34:27> [dest: 37.59.25.124] connection closed (0 seconds) (UID: 0)[L: 0]{Bytes: 8192}(P: 0)
<08/13/17@20:34:27> [yp_add] yp.shoutcast.com gave error (nak)
<08/13/17@20:34:27> [yp_add] yp.shoutcast.com gave extended error (Cannot see your station/computer (URL: http://176.25.235.68:8000) from the Internet, disable Internet Sharing/NAT/firewall/ISP cache - see http://wiki.shoutcast.com/wiki/SHOUTcast_YP_Nak_Errors [480])

I even went to the extreme of disabling windows firewall and even uninsulated my antivirus software but it still doesn't work.
I really thought if the port 8000 is showing as open everything will be ok.
Please help.
JamFM69 is offline   Reply With Quote
Old 14th August 2017, 13:57   #2
djSpinnerCee
Forum King
 
djSpinnerCee's Avatar
 
Join Date: Aug 2004
Location: Hollis, Queens/The Bronx, NYC
Posts: 3,548
your port forwarding and firewall on your server are configured correctly because you see the directory tester is connecting.

your server is v1, so no reason to try to be public, the station will not be listed in the shoutcast directory, it will be available nonetheless to the whole internet.
djSpinnerCee is offline   Reply With Quote
Old 14th August 2017, 16:36   #3
JamFM69
Junior Member
 
Join Date: Aug 2017
Posts: 8
Thanks for quick reply.....but

Hi I appreciate your quick responce.

I didn't quite understand what you mean't theres no need to be public. How can people find me like they used to on the Shoutcast site?
And what did you mean my server is v1? Wasen't it v1 when I used to use it years ago?

And what exactly is preventing me to go public on the shoutcast site?
Any help would be appreciated as I can't test it other people can tune into my station.
Unless you could test it for me, the link is below:
http://176.25.235.68:8000)
Thank you.
JamFM69 is offline   Reply With Quote
Old 14th August 2017, 16:37   #4
JamFM69
Junior Member
 
Join Date: Aug 2017
Posts: 8
I even tried setting up a static address as someone from Sky suggested this, but then I found I couldn't browse anything on the internet so had to revert back to how it was in default.
JamFM69 is offline   Reply With Quote
Old 14th August 2017, 19:44   #5
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 534
Send a message via AIM to dopelabs
not sure what the issue is... the sc_serv is reachable from the internets just fine.. maybe fwd port 8001 as well... generally a good idea if you want anyone from outside your local network to have the ability to source the stream.
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2017-08-14 at 11.36.29 705AM.png
Views:	279
Size:	130.0 KB
ID:	53475  
dopelabs is offline   Reply With Quote
Old 14th August 2017, 20:02   #6
JamFM69
Junior Member
 
Join Date: Aug 2017
Posts: 8
port 8001 is also successfully open

This is what I don't understand when I did a check to see if port 8001 is open its says successfully open, just as 8000 is.

Yet I still get error: Cannot see your station/computer (URL: http://176.25.235.68:8000) from the Internet, disable Internet Sharing/NAT/firewall/ISP cache

I been trying my best to sort this for 3 days solid now, its blowing my mind.

I used to use it fine, yet the only changes I made is upgrade to windows 10, and use the latest winamp and dsp software as recommended.

I was used to port forwarding so I know I did that right.

One of the other admin said its because I am using server v1 instead of v2, but I used to use v1 and was discoverable on the shoutcast website ok then, whats changed?
JamFM69 is offline   Reply With Quote
Old 14th August 2017, 20:03   #7
JamFM69
Junior Member
 
Join Date: Aug 2017
Posts: 8
dopelabs we're you able to actually hear my music?
JamFM69 is offline   Reply With Quote
Old 15th August 2017, 02:54   #8
DJ Egg
Techorator
Winamp & Shoutcast Team
 
Join Date: Jun 2000
Posts: 35,867
http://help.winamp.com/customer/en/p...ading-the-dnas
DJ Egg is offline   Reply With Quote
Old 23rd August 2017, 20:34   #9
JamFM69
Junior Member
 
Join Date: Aug 2017
Posts: 8
I got the latest DNAS

I got the DNAS 2.3.5 But it still says (Cannot see your station/computer (URL: http://176.26.212.250:8000) from the Internet, disable Internet Sharing/NAT/firewall

What confuses me I never had this problem before.

People say they can tune into me using the link http://176.26.212.250:8000 but I don't like to expose my IP address all over the world.

Is there a way to turn my link to just the name of the station so that I just post that?

I have created a station fan page on facebook so all I basically need is for them to click the link. I've given up on the idea of being on the shoutcast web site list of stations.

Any help will be appareciated.
JamFM69 is offline   Reply With Quote
Old 23rd August 2017, 20:49   #10
NatSurvivorsNW
Junior Member
 
Join Date: Aug 2017
Posts: 7
How are you getting on?

If you prefer not to publicise your IP address and want a url instead, you could use a dynamic dns service like https://www.noip.com/free But of course they can still find your IP address by pinging the DDNS name.
Is this what you mean?
NatSurvivorsNW is offline   Reply With Quote
Old 26th August 2017, 10:05   #11
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 534
Send a message via AIM to dopelabs
if you are hosting any type of public service on the internet, your ip address, or associated dns name should be publicly available and accessible. if that also happens to be your home computer, then you might want to think twice about hosting public facing services on it.

what you can do is, if you have any type of website hosting in place. create a playlist file that has the server address in it.

you can even go to the DNAS server page, right click on the listen link and download the pls. then upload that pls file to your webserver. if you put the file in the root directory (same directory as your main index.php or index.html file) and name the file listen.pls. you would then link people to http://www.yourdomain.com/listen.pls
dopelabs is offline   Reply With Quote
Old 16th September 2017, 11:32   #12
sqgl
Senior Member
 
sqgl's Avatar
 
Join Date: Sep 2008
Location: Australia
Posts: 188
Quote:
Originally Posted by JamFM69 View Post
Hi I appreciate your quick responce.

I didn't quite understand what you mean't theres no need to be public. How can people find me like they used to on the Shoutcast site?
And what did you mean my server is v1? Wasen't it v1 when I used to use it years ago?

And what exactly is preventing me to go public on the shoutcast site?
Any help would be appreciated as I can't test it other people can tune into my station.
It appears to be a policy decision by Shoutcast HQ. They want us all to migrate to v2 and they have done this to deliberately discourage us from using v1.

If you relay from a v1 server to a v2 server, you still will not be listed.

If you relay from a v2 server to a v1 server, you still will be listed but only the listeners on your v1 server will be counter in the yellow pages.

I hate this because I use a script which will not work on the v2 admin page. That script identifies regular listeners for me. Actually it does work but v2 admin pages refresh automatically, undoing the effects of my script.

Remixing listener requests of ambient tracks live http://RePlayScape.com
sqgl is offline   Reply With Quote
Old 16th September 2017, 13:40   #13
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 534
Send a message via AIM to dopelabs
if you have a valid authhash on your v2 server and its set to public, you should be listed in the shoutcast yp. it doesnt matter if the stream is being sourced by a client or if its configured to relay another stream.

ive never noticed the admin pages to auto refresh... further more there are methods for obtaining listener stats which are much more efficient and have been the same since v1, such as legacy /7.html or /admin.cgi?sid=<sid>&mode=viewxml&page=3.

there is also /admin.cgi?sid=<sid>&mode=viewjson&page=3 which is a v2 feature only.

if you use those you can be sure that the formatting will not change and your scripts wont break.
dopelabs is offline   Reply With Quote
Old 17th September 2017, 14:06   #14
sqgl
Senior Member
 
sqgl's Avatar
 
Join Date: Sep 2008
Location: Australia
Posts: 188
Quote:
Originally Posted by dopelabs View Post
if you have a valid authhash on your v2 server and its set to public, you should be listed in the shoutcast yp. it doesnt matter if the stream is being sourced by a client or if its configured to relay another stream.
Which agrees with what I said (clumsily with typos) to the OP. The problem (for me) is still that the v1 listeners are not counted in the YP.

Quote:
Originally Posted by dopelabs View Post
ive never noticed the admin pages to auto refresh...
Nobody would notice unless they had a script which altered it. The page does have a "stream uptime" counter which changes every second (probably contributes to the problem).

Quote:
Originally Posted by dopelabs View Post
further more there are methods for obtaining listener stats which are much more efficient and have been the same since v1, such as legacy /7.html
Thanks, this sounds promising but I don't know what you mean by "/7.html". I tried "...admin.cgi/7.html" but that merely presents a media player (which does not play properly anyhow).

Quote:
Originally Posted by dopelabs View Post
or /admin.cgi?sid=<sid>&mode=viewxml&page=3.
XML is not really a substitute for an admin page unfortunately (tags, uptime in seconds, and not amenable to my script since it is not html)

Quote:
Originally Posted by dopelabs View Post
which is a v2 feature only.
It is identical to what v1 called "Get XML stats" via a hyperlink.

Quote:
Originally Posted by dopelabs View Post
if you use those you can be sure that the formatting will not change and your scripts wont break.
I'm hoping there were typos in your post and there really is a legacy admin display option. If you can please get back to us I'd be extremely grateful. I've spent many hours trying to work around this.

Remixing listener requests of ambient tracks live http://RePlayScape.com
sqgl is offline   Reply With Quote
Old 17th September 2017, 14:18   #15
sqgl
Senior Member
 
sqgl's Avatar
 
Join Date: Sep 2008
Location: Australia
Posts: 188
Just fixing my underlined typos:

Quote:
Originally Posted by sqgl View Post
If you relay from a v1 server to a v2 server, you still will not be listed.

If you relay from a v2 server to a v1 server, you still will be listed but only the listeners on your v1 server will be counter in the yellow pages.
If you relay from a v2 server to a v1 server, you will be listed but only the listeners on your v1 server will be counted in the yellow pages.

Remixing listener requests of ambient tracks live http://RePlayScape.com
sqgl is offline   Reply With Quote
Old 17th September 2017, 16:31   #16
neralex
Major Dude
 
Join Date: Mar 2011
Posts: 576
Quote:
Originally Posted by sqgl View Post
...this sounds promising but I don't know what you mean by "/7.html". I tried "...admin.cgi/7.html" but that merely presents a media player (which does not play properly anyhow).
Quote:
Originally Posted by DNAS wiki
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 is no longer provided in the SHOUTcast v2 DNAS and has been replaced by an equivalent xml response which provides some extra information via the /stats (public) or admin.cgi?mode=viewxml&page=1 (private) options.
The following shows the order of and what information was provided by the 7.html response against the xml entry name in the /stats or admin.cgi?mode=viewxml&page=1 xml response:

CURRENTLISTENERS STREAMSTATUS PEAKLISTENERS MAXLISTENERS UNIQUELISTENERS BITRATE SONGTITLE
IP:PORT/7.html

Quote:
Originally Posted by sqgl View Post
XML is not really a substitute for an admin page unfortunately (tags, uptime in seconds, and not amenable to my script since it is not html)
With PHP you have many ways how you can calculate seconds in hours. The same with Javascript, if you are using JSON(P) instead of XML.
neralex is offline   Reply With Quote
Old 18th September 2017, 05:20   #17
dopelabs
Major Dude
 
dopelabs's Avatar
 
Join Date: Oct 2006
Location: Silicon Valley
Posts: 534
Send a message via AIM to dopelabs
Quote:
Originally Posted by sqgl View Post
Nobody would notice unless they had a script which altered it. The page does have a "stream uptime" counter which changes every second (probably contributes to the problem).
the page does not refresh due to the uptime counter

Quote:
Originally Posted by sqgl View Post
Thanks, this sounds promising but I don't know what you mean by "/7.html". I tried "...admin.cgi/7.html" but that merely presents a media player (which does not play properly anyhow).
7.html is a csv formatted string that is available in v1/2.

v1
code:
http://hostort/7.html


v2
code:
http://hostort/7.html?sid=<sid>


i think the values are

current listeners,public,peak listeners,max listeners, bitrate, song title


Quote:
Originally Posted by sqgl View Post
XML is not really a substitute for an admin page unfortunately (tags, uptime in seconds, and not amenable to my script since it is not html)
actually, thats exactly what it is and what its designed for. its much easier and more efficient to parse the information you need from the xml or json data because its structured in a uniform way, unlink http which can be all over the place, and can (and will most likely) change over time as the dnas is updated.

lets take a look at some of the XML output thats provided using a dnas with 2 streams...

from http://hostort/statistics
code:

<SHOUTCASTSERVER>
<STREAMSTATS>
<TOTALSTREAMS>4</TOTALSTREAMS>
<ACTIVESTREAMS>4</ACTIVESTREAMS>
<CURRENTLISTENERS>24</CURRENTLISTENERS>
<PEAKLISTENERS>429</PEAKLISTENERS>
<MAXLISTENERS>1200</MAXLISTENERS>
<UNIQUELISTENERS>23</UNIQUELISTENERS>
<AVERAGETIME>2024</AVERAGETIME>
<VERSION>2.5.1.724 (posix(linux x64))</VERSION>
<STREAM id="1">
<CURRENTLISTENERS>20</CURRENTLISTENERS>
<PEAKLISTENERS>192</PEAKLISTENERS>
<MAXLISTENERS>500</MAXLISTENERS>
<UNIQUELISTENERS>19</UNIQUELISTENERS>
<AVERAGETIME>11578</AVERAGETIME>
<SERVERGENRE>Genre1</SERVERGENRE>
<SERVERGENRE2>Genre2</SERVERGENRE2>
<SERVERGENRE3>Genre3</SERVERGENRE3>
<SERVERGENRE4>Genre4</SERVERGENRE4>
<SERVERGENRE5>Genre5</SERVERGENRE5>
<SERVERURL>https://www.domain.com</SERVERURL>
<SERVERTITLE>Station Name</SERVERTITLE>
<SONGTITLE>
Song Title
</SONGTITLE>
<SONGURL>https://www.domain.com</SONGURL>
<STREAMHITS>15603</STREAMHITS>
<STREAMSTATUS>1</STREAMSTATUS>
<BACKUPSTATUS>0</BACKUPSTATUS>
<STREAMLISTED>1</STREAMLISTED>
<STREAMPATH>/256mp3</STREAMPATH>
<STREAMUPTIME>1175803</STREAMUPTIME>
<BITRATE>256</BITRATE>
<SAMPLERATE>44100</SAMPLERATE>
<CONTENT>audio/mpeg</CONTENT>
</STREAM>
<STREAM id="2">
<CURRENTLISTENERS>4</CURRENTLISTENERS>
<PEAKLISTENERS>87</PEAKLISTENERS>
<MAXLISTENERS>250</MAXLISTENERS>
<UNIQUELISTENERS>4</UNIQUELISTENERS>
<AVERAGETIME>37005</AVERAGETIME>
<SERVERGENRE>Genre1</SERVERGENRE>
<SERVERGENRE2>Genre2</SERVERGENRE2>
<SERVERGENRE3>Genre3</SERVERGENRE3>
<SERVERGENRE4>Genre4</SERVERGENRE4>
<SERVERGENRE5>Genre5</SERVERGENRE5>
<SERVERURL>https://www.domain.com</SERVERURL>
<SERVERTITLE>Station Name</SERVERTITLE>
<SONGTITLE>
Song Title
</SONGTITLE>
<SONGURL>https://www.domain.com</SONGURL>
<STREAMHITS>6927</STREAMHITS>
<STREAMSTATUS>1</STREAMSTATUS>
<BACKUPSTATUS>0</BACKUPSTATUS>
<STREAMLISTED>1</STREAMLISTED>
<STREAMPATH>/128mp3</STREAMPATH>
<STREAMUPTIME>1175803</STREAMUPTIME>
<BITRATE>128</BITRATE>
<SAMPLERATE>44100</SAMPLERATE>
<CONTENT>audio/mpeg</CONTENT>
</STREAM>
</STREAMSTATS>
</SHOUTCASTSERVER>



if we want only a specific sid..

from http://hostort/admin.cgi?sid=<sid>&mode=viewxml
code:

<SHOUTCASTSERVER>
<CURRENTLISTENERS>16</CURRENTLISTENERS>
<PEAKLISTENERS>192</PEAKLISTENERS>
<MAXLISTENERS>500</MAXLISTENERS>
<UNIQUELISTENERS>15</UNIQUELISTENERS>
<AVERAGETIME>17713</AVERAGETIME>
<SERVERGENRE>Genre1</SERVERGENRE>
<SERVERGENRE2>Genre2</SERVERGENRE2>
<SERVERGENRE3>Genre3</SERVERGENRE3>
<SERVERGENRE4>Genre4</SERVERGENRE4>
<SERVERGENRE5>Genre5</SERVERGENRE5>
<SERVERURL>https://www.domain.com</SERVERURL>
<SERVERTITLE>Station Name</SERVERTITLE>
<SONGTITLE>
Song Title
</SONGTITLE>
<SONGURL>https://www.domain.com</SONGURL>
<STREAMHITS>15787</STREAMHITS>
<STREAMSTATUS>1</STREAMSTATUS>
<BACKUPSTATUS>0</BACKUPSTATUS>
<STREAMLISTED>1</STREAMLISTED>
<STREAMSOURCE>127.0.0.1</STREAMSOURCE>
<STREAMPATH>/256mp3</STREAMPATH>
<STREAMUPTIME>1183614</STREAMUPTIME>
<BITRATE>256</BITRATE>
<SAMPLERATE>44100</SAMPLERATE>
<CONTENT>audio/mpeg</CONTENT>
<VERSION>2.5.1.724 (posix(linux x64))</VERSION>
<LISTENERS>
<LISTENER>
<HOSTNAME>127.0.0.1</HOSTNAME>
<USERAGENT>Lavf/57.76.100</USERAGENT>
<CONNECTTIME>58203</CONNECTTIME>
<UID>30406</UID>
<TYPE>1</TYPE>
<REFERER/>
<XFF/>
<GRID>30406</GRID>
<TRIGGERS>0</TRIGGERS>
</LISTENER>
<LISTENER>
<HOSTNAME>127.0.0.1</HOSTNAME>
<USERAGENT>Nullsoft Winamp3 version 3.0 (compatible)</USERAGENT>
<CONNECTTIME>29111</CONNECTTIME>
<UID>33439</UID>
<TYPE>524289</TYPE>
<REFERER/>
<XFF/>
<GRID>33439</GRID>
<TRIGGERS>0</TRIGGERS>
</LISTENER>
</LISTENERS>
</SHOUTCASTSERVER>



further more if you specify a specific page at the end of that url you can filter the response

http://hostort/admin.cgi?sid=<sid>&mode=viewxml&page=1

will only show the server portion for that sid
code:

<SHOUTCASTSERVER>
<CURRENTLISTENERS>18</CURRENTLISTENERS>
<PEAKLISTENERS>192</PEAKLISTENERS>
<MAXLISTENERS>500</MAXLISTENERS>
<UNIQUELISTENERS>17</UNIQUELISTENERS>
<AVERAGETIME>16380</AVERAGETIME>
<SERVERGENRE>Genre1</SERVERGENRE>
<SERVERGENRE2>Genre2</SERVERGENRE2>
<SERVERGENRE3>Genre3</SERVERGENRE3>
<SERVERGENRE4>Genre4</SERVERGENRE4>
<SERVERGENRE5>Genre5</SERVERGENRE5>
<SERVERURL>https://www.domain.com</SERVERURL>
<SERVERTITLE>Station Name</SERVERTITLE>
<SONGTITLE>
Song Title
</SONGTITLE>
<SONGURL>https://www.domain.com</SONGURL>
<STREAMHITS>15810</STREAMHITS>
<STREAMSTATUS>1</STREAMSTATUS>
<BACKUPSTATUS>0</BACKUPSTATUS>
<STREAMLISTED>1</STREAMLISTED>
<STREAMSOURCE>50.117.1.58</STREAMSOURCE>
<STREAMPATH>/256mp3</STREAMPATH>
<STREAMUPTIME>1184310</STREAMUPTIME>
<BITRATE>256</BITRATE>
<SAMPLERATE>44100</SAMPLERATE>
<CONTENT>audio/mpeg</CONTENT>
<VERSION>2.5.1.724 (posix(linux x64))</VERSION>
</SHOUTCASTSERVER>



http://hostort/admin.cgi?sid=<sid>&mode=viewxml&page=3

will only show you the listeners
code:

<SHOUTCASTSERVER>
<LISTENERS>
<LISTENER>
<HOSTNAME>127.0.0.1</HOSTNAME>
<USERAGENT>Lavf/57.76.100</USERAGENT>
<CONNECTTIME>58601</CONNECTTIME>
<UID>30406</UID>
<TYPE>1</TYPE>
<REFERER/>
<XFF/>
<GRID>30406</GRID>
<TRIGGERS>0</TRIGGERS>
</LISTENER>
<LISTENER>
<HOSTNAME>127.0.0.1</HOSTNAME>
<USERAGENT>Nullsoft Winamp3 version 3.0 (compatible)</USERAGENT>
<CONNECTTIME>29509</CONNECTTIME>
<UID>33439</UID>
<TYPE>524289</TYPE>
<REFERER/>
<XFF/>
<GRID>33439</GRID>
<TRIGGERS>0</TRIGGERS>
</LISTENER>
</LISTENERS>
</SHOUTCASTSERVER>



http://hostort/admin.cgi?sid=<sid>&mode=viewxml&page=3&ipcount=1

will only return the ip address and how many connections there are from each ip
code:

<SHOUTCASTSERVER>
<LISTENERS>
<LISTENER>
<HOSTNAME>127.0.0.1</HOSTNAME>
<TOTAL>2</TOTAL>
</LISTENER>
</LISTENERS>
</SHOUTCASTSERVER>



&page=4 shows the song history
&page=5 shows the metadata of that sid
&page=6 shows the stream configs for all sids


Quote:
Originally Posted by sqgl View Post
It is identical to what v1 called "Get XML stats" via a hyperlink.
i was referring to the json formatted output, which is a V2 feature only.

and the viewmode=xml output is identical to the link on a v1 that says get xml stats. thats the important part. if you were already using the xml to get the stats on a v1 server, there is nothing for you to change since the xml output from a v1 and v2 server is the same. v2 dnas provides additional methods for more stats data and filtering as well.

shoutcast may make changes to the index.html output of the dnas, that is why it is not recommended to parse the html for any reason, as it may change, and your script will break.

using a language such as php which has built in libraries to handle xml data, we can write something nice and easy to extract the data that we want. for example

i created a file called getxml.php and put the following in it
code:

<html><head><title></title></head>
<body>
<?php

$url = "http://127.0.0.1/admin.cgi?sid=1&mode=viewxml&page=1&pass=password";

function file_get_contents_curl($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}

$xml = file_get_contents_curl($url);
$stats = simplexml_load_string($xml);

$sname = $stats->SERVERTITLE;
$sgenre1 = $stats->SERVERGENRE;
$sgenre2 = $stats->SERVERGENRE2;
$surl = $stats->SERVERURL;
$stitle = $stats->SONGTITLE;
$slisteners = $stats->CURRENTLISTENERS;
$sbitrate = $stats->BITRATE;
$savgtime = $stats->AVERAGETIME;

echo "$sname<br>\n";
echo "$sgenre1<br>\n";
echo "$sgenre2<br>\n";
echo "$surl<br>\n";
echo "$stitle<br>\n";
echo "$slisteners<br>\n";
echo "$sbitrate<br>\n";
echo "$savgtime<br>\n";

?>
</body></html>



when i view the getxml.php in a browser i see the following

Station Name
Genre1
Genre2
https://www.domain.com
Song Title
14
256
20316


see the attached screenshot as well...

Quote:
Originally Posted by sqgl View Post
I'm hoping there were typos in your post and there really is a legacy admin display option. If you can please get back to us I'd be extremely grateful. I've spent many hours trying to work around this.
admincssfile=v1

this will change the admin pages to 'look' like v1 dnas. please note that this is most likely only a cosmetic change, and the underlying html code my still be different from a v1 dnas.
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2017-09-17 at 9.11.37 314PM.png
Views:	199
Size:	49.8 KB
ID:	53534  
dopelabs is offline   Reply With Quote
Old 5th October 2017, 12:15   #18
sqgl
Senior Member
 
sqgl's Avatar
 
Join Date: Sep 2008
Location: Australia
Posts: 188
Lots of good reference material there, thanks. Hopefully others find it useful in future.
Quote:
Originally Posted by sqgl View Post
If you relay from a v2 server to a v1 server, you will be listed but only the listeners on your v1 server will be counted in the yellow pages.
Oh FFS my typo fix still had errors. Here is what I meant to say (third time lucky):

If you relay from a v2 server to a v1 server, you will be listed but only the listeners on your v2 server will be counted in the yellow pages.

And bear in mind what I said earlier
Quote:
Originally Posted by sqgl View Post
If you relay from a v1 server to a v2 server, you will not be listed.

Remixing listener requests of ambient tracks live http://RePlayScape.com
sqgl is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump