![]() |
#1 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 148
|
Help with Script
I have a script which lists the listeners on all my streams but it was designed to collect stats for Shoutcast V1.
Can anyone tell me what needs changing to make it work with Shoutcast 2 please: $serv["name"][] = "192kbps - Trance"; # short nickname of server. $serv["host"][] = "xxx.xxx.xxx.xxx"; # host address # port IP address $serv["port"][] = "8030"; # port number $serv["passwd"][] = "xxxxx"; # admin password Many thanks in advance |
![]() |
![]() |
![]() |
#2 |
Forum King
Join Date: Aug 2004
Location: Hollis, Queens/The Bronx, NYC
Posts: 3,549
|
you may want to post some of the script - most of the infomation in a v2 server is found in the same place as in a v1, but you may need to add support for the streamid in your script.
what language is your script written? btw: you should never need the pasword to get listeners (or track title, or stream name, etc...) - that comes from the dnas public pages (index.html, stats, 7.html...). /* v2 HTML5 / Player test pages DigitalMixNYC, DigitalMixNYCbx | DNAS Status: Now Playing js codes (scaststatus_X.php) | PortForward.com | Upload/Download Speed Test | No-IP.com: Free Dynamic DNS | In the YP | dnasDir */ Last edited by djSpinnerCee; 18th August 2017 at 23:36. Reason: typo |
![]() |
![]() |
![]() |
#3 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 148
|
Here you go:
<? # name of station $streamname = "1Mix Radio Trance"; #Put your stream name here # number of songs to show. $songhistorylimit = 20; # Top n Countries $countrylimit = 50; # path of GeoIP.dat $geoip_path = "."; # sort floating nav menu # 0 = OFF, 1 = sort by current listener and max slot $sort_navmenu = 1; # server config; you can add as many servers as you want in following format # FR1 Hub $serv["name"][] = "192kbps - Trance"; # short nickname of server. $serv["host"][] = "xxxxxx"; # host address # port IP address $serv["port"][] = "8030"; # port number $serv["passwd"][] = "xxxxxx"; # admin password ?> I've been using it for many years and I've forgotten where I found it now.. |
![]() |
![]() |
![]() |
#4 |
Forum King
Join Date: Aug 2004
Location: Hollis, Queens/The Bronx, NYC
Posts: 3,549
|
ok - now i see why you need the stream password -- to get the listener table ... so your script is getting the admin xml most likely. in any event, you've only posted the config script -- to get your script fixed, you can post the entire script (or set of scripts) if you want someone here to tweak it for you. the specific config info is not required, but at least replace them with dummy values.
/* v2 HTML5 / Player test pages DigitalMixNYC, DigitalMixNYCbx | DNAS Status: Now Playing js codes (scaststatus_X.php) | PortForward.com | Upload/Download Speed Test | No-IP.com: Free Dynamic DNS | In the YP | dnasDir */ |
![]() |
![]() |
![]() |
#5 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 148
|
OK, I've cleaned out the details relating to my station and attached a zip of the files.
There are other issues with the script but in general it gives me what I need, but it doesn't work with V2. I hope it can be fixed easily ![]() I tried to upload it as a ZIP file bout it wouldn't let me https://1drv.ms/u/s!Asny6aInDnFZqGvzGmzt3bwBQuiy |
![]() |
![]() |
![]() |
#6 |
Forum King
Join Date: Aug 2004
Location: Hollis, Queens/The Bronx, NYC
Posts: 3,549
|
changes made to three files - i changed their names so you can install them alongside the originals.
shoutcast-config2.php -- the config file -- the only addition was to add an sid parameter to the $serv[] array: $serv["sid"][] = "1"; // v2 sid - when > 0 indicates a v2 dnas, 0= v1 dnas. status-shoutcast2.php - the main prog, it will call shoutcast-config2.php and dat/shoutcast.class2.php --- make sure this is in the dat/ folder. i too had trouble attaching a zip, so http://djspinnercee.servemp3.com:114...shoutcast2.zip -- just the three changed files http://djspinnercee.servemp3.com:114...ges/trance.zip --the full (unmodified) original package as .zip if you have trouble with these, i can post them on my google drive. /* v2 HTML5 / Player test pages DigitalMixNYC, DigitalMixNYCbx | DNAS Status: Now Playing js codes (scaststatus_X.php) | PortForward.com | Upload/Download Speed Test | No-IP.com: Free Dynamic DNS | In the YP | dnasDir */ |
![]() |
![]() |
![]() |
#7 |
Senior Member
Join Date: Apr 2004
Location: Isle of Man UK
Posts: 148
|
djSpinnerCee - your an absolute star!
Thank you so much for your work on this and hopefully it will also benefit the wider community.. I'm now in the process of renaming the flags to UPPER case so they all show correctly - if anyone knows how to batch rename a load of gifs from gb.gif to GB.GIF that will save some time ![]() |
![]() |
![]() |
![]() |
|
Tags |
admin.cgi viewxml, php |
Thread Tools | Search this Thread |
Display Modes | |
|
|