![]() |
#1 |
Member
Join Date: Dec 2016
Location: New York, NY
Posts: 74
|
Embed Shoutcast V2 Stats
Hey there,
Does anyone have a PHP script that displays "Current Listeners" as a sum of multiple shoutcast v2 streams/mountpoints? I tried this code but keep getting 0 as a result: https://www.dlnetworks.net/scratch/multi-shout-totals/ I've tried others mentioned in this forum with no success Perhaps different coding is required for SHOUTcast Server v2.5.1.723?? thanks in advance for any help |
![]() |
![]() |
![]() |
#2 |
Major Dude
Join Date: Mar 2011
Posts: 576
|
You can do it with XML or with JSON. Please check the DNAS docs in the download-folder:
/docs/DNAS_Server_XML_Responses.html /docs/DNAS_Server_JSON_Responses.html http://forums.winamp.com/showthread....03#post3015503 PHP Code:
|
![]() |
![]() |
![]() |
#3 | |
Member
Join Date: Dec 2016
Location: New York, NY
Posts: 74
|
Quote:
Thanks for your help.. unfortunately I get a blank page - I configured with our IP & Port |
|
![]() |
![]() |
![]() |
#4 |
Major Dude
Join Date: Mar 2011
Posts: 576
|
Works without a hit. Not sure where you let it run but make sure the server runs with a webserver like apache2 or nginx and php5 or php7 and the file is inside a web-directory.
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Join Date: Dec 2016
Location: New York, NY
Posts: 74
|
yeah apache 2, php 5 and inside web directory.. blank page
have you tested with SHOUTcast v2.5.1.723 ?? |
![]() |
![]() |
![]() |
#6 |
Major Dude
Join Date: Mar 2011
Posts: 576
|
Yes for sure, but a blank page has nothing do to with SHOUTcast!
Compare what you pasted. You have to paste all codelines inclusive <?php ... ?> ! If you made changes, compare it also with the original code. Check your php error-log to find the issues. The script is clean and runs without any error. |
![]() |
![]() |
![]() |
#7 |
Member
Join Date: Dec 2016
Location: New York, NY
Posts: 74
|
cool.. thanks for your help. It's all pasted correctly, with IP and port as only change.. I'll email my web hosting support.. it looks like our site might have some type of php script block
thanks again, |
![]() |
![]() |
![]() |
#8 |
Forum King
Join Date: Aug 2004
Location: Hollis, Queens/The Bronx, NYC
Posts: 3,549
|
most php hosting does not allow hosted scripts to make external http (tcp) requests.
/* 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 */ |
![]() |
![]() |
![]() |
#9 |
Member
Join Date: Dec 2016
Location: New York, NY
Posts: 74
|
thanks for the help guys.. sent quick email to web hosting provider and issue solved
|
![]() |
![]() |
![]() |
#10 |
Junior Member
Join Date: Feb 2011
Posts: 9
|
HTML Code:
Listeners (sid= 1): 0 Stream-Status (sid=1): 0 Current Streanttitle (sid=1): no title available Listeners (sid=2): 0 Stream-Status (sid=2): 0 Current Streanttitle (sid=2): no title available Listeners (sum): 0 |
![]() |
![]() |
![]() |
#11 |
Major Dude
Join Date: Mar 2011
Posts: 576
|
@TopFloorDjs you have to add your IP and port at the top of the script.
$sc_ip = '192.241.129.98'; $sc_port = '9300'; HTML Code:
Listeners (sid= 1): 0 Stream-Status (sid=1): 1 Current Streanttitle (sid=1): TWRK & Lambo - The Benzi Edit Vault (LDS #192) - Independent (VIP SHORT EDIT) PHP Code:
PHP Code:
|
![]() |
![]() |
![]() |
#12 |
Junior Member
Join Date: Feb 2011
Posts: 9
|
Thanks, for some careless reason i kept the http:// in before the hostip. How can i view the XML file so i can grab more data from it?
Firstly im hoping to grab all strings so i can show stats like (if autodj === enabled) Once ive grabbed all the data im going to google how to take data from the PHP file and use it in my vBulletin4 template. |
![]() |
![]() |
![]() |
#13 |
Major Dude
Join Date: Mar 2011
Posts: 576
|
/docs/DNAS_Server_XML_Responses.html
http://192.241.129.98:9300/stats?sid=1 http://php.net/manual/en/function.include-once.php |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|