Go Back   SZONE.US Forums > Do it yourself (DIY) > Web Tips > Standalone

Standalone Here you can find standalone web scripts.

Standalone PHP Shoutcast Status

Views:74261
Reply
Thread Tools Search this Thread Rating: Thread Rating: 8 votes, 5.00 average.
  #21  
Unread 04.13.11, 05:43 PM
Zachariah Boren's Avatar
Zachariah Boren Zachariah Boren is offline
Administrator
 
Join Date: 02.07
Location: Canoga Park, CA
Posts: 928
Blog Entries: 6
Images: 10075
Send a message via ICQ to Zachariah Boren Send a message via MSN to Zachariah Boren Send a message via twitter to Zachariah Boren
Quote:
Originally Posted by Yngwiedis View Post
Hello...

Is easy for you to tell me how to modify the config file so i can display only the 10 latest songs ?

I am trying to make it but i cant find the correct syntax.

Thank you very very much.
There is not a setting to limit the history in the script (yet). I will see about working on a easy setting.

There is a setting in the shoutcast server.
- sc_sevr.ini (on the shoutcast server)
Code:
; ShowLastSongs specifies how many songs to list in the /played.html
; page.  The default is 10.  Acceptable entries are 1 to 20.
ShowLastSongs=20
You can set this to 10.
__________________
http://www.szone.us | http://www.gzhq.net
Twitter | Facebook | My:Hacks @ vBulletin.org
Member of Kiwanis Club of Chatsworth
Reply With Quote
  #22  
Unread 04.13.11, 06:34 PM
Zachariah Boren's Avatar
Zachariah Boren Zachariah Boren is offline
Administrator
 
Join Date: 02.07
Location: Canoga Park, CA
Posts: 928
Blog Entries: 6
Images: 10075
Send a message via ICQ to Zachariah Boren Send a message via MSN to Zachariah Boren Send a message via twitter to Zachariah Boren
@Yngwiedis

You can add a limit for now to the foreach() statement that pulls the $song_history.

file: config.php
line: 204 - 206
PHP Code:
foreach ($old_songs as $value) {
   
$song_history .= "+ " $value "<br />";

Change to:
PHP Code:
$i 0;
foreach (
$old_songs as $value) {
   
$song_history .= "+ " $value "<br />";
   if (++
$i == 10) break;

__________________
http://www.szone.us | http://www.gzhq.net
Twitter | Facebook | My:Hacks @ vBulletin.org
Member of Kiwanis Club of Chatsworth
Reply With Quote
  #23  
Unread 04.13.11, 09:31 PM
Yngwiedis Yngwiedis is offline
Junior Member
 
Join Date: 04.11
Posts: 4
Is working fine now Thank you very very much
Reply With Quote
  #24  
Unread 05.03.11, 09:47 AM
billyarme billyarme is offline
Junior Member
 
Join Date: 05.11
Posts: 1
Two Streams same IP

Hello I am using shoutcast for streaming and my provider gives me 2 streaming sources in same IP and different port. Your script seems to works fine for the first port (8018) but not for the second port (8048). I get this error when i try the second port:

Connecting to xxx.xxx.xx.xxx:8048 = YES.
Source stream to the server = NO

Is there any problem with my provider or with your script

Regards
Reply With Quote
  #25  
Unread 05.03.11, 12:00 PM
Zachariah Boren's Avatar
Zachariah Boren Zachariah Boren is offline
Administrator
 
Join Date: 02.07
Location: Canoga Park, CA
Posts: 928
Blog Entries: 6
Images: 10075
Send a message via ICQ to Zachariah Boren Send a message via MSN to Zachariah Boren Send a message via twitter to Zachariah Boren
Quote:
Originally Posted by billyarme View Post
Hello I am using shoutcast for streaming and my provider gives me 2 streaming sources in same IP and different port. Your script seems to works fine for the first port (8018) but not for the second port (8048). I get this error when i try the second port:

Connecting to xxx.xxx.xx.xxx:8048 = YES.
Source stream to the server = NO

Is there any problem with my provider or with your script

Regards
The DIAG info states that it can connect to the Shoutcast Server IP and Port, but there is no source to the server. The DJ / Source is not connected to the Shoutcast server and transmitting music. Since there is no incoming media the script will show the server to be off line to the public as there is nothing for them to tune into. Once you have a source connected it should go online.

To disable the DEBUG feedback from the script when there is no connection open config.php

Code:
// Enable error feedback for connection problems (1/0 - on/off)
$debug = "1";
Change the value to "0" zero.
__________________
http://www.szone.us | http://www.gzhq.net
Twitter | Facebook | My:Hacks @ vBulletin.org
Member of Kiwanis Club of Chatsworth
Reply With Quote
  #26  
Unread 05.12.11, 02:13 PM
Yngwiedis Yngwiedis is offline
Junior Member
 
Join Date: 04.11
Posts: 4
Hello...

I have a strange problem...
The script is working fine when the listeners are below 20.
When the listeners going 21 and more the script are stop working and display the shoutcast server is offline (which is not).

I cant understand why.
I search everything from my end.

Can you help me with that problem ?

Thank you very very much.
Reply With Quote
  #27  
Unread 05.12.11, 04:45 PM
Zachariah Boren's Avatar
Zachariah Boren Zachariah Boren is offline
Administrator
 
Join Date: 02.07
Location: Canoga Park, CA
Posts: 928
Blog Entries: 6
Images: 10075
Send a message via ICQ to Zachariah Boren Send a message via MSN to Zachariah Boren Send a message via twitter to Zachariah Boren
Quote:
Originally Posted by Yngwiedis View Post
Hello...

I have a strange problem...
The script is working fine when the listeners are below 20.
When the listeners going 21 and more the script are stop working and display the shoutcast server is offline (which is not).

I cant understand why.
I search everything from my end.

Can you help me with that problem ?

Thank you very very much.
The script pulls 8K of XML data from the Shoutcast server.
This might equal 20 users worth of information.

Try this: edit config.php

Find in (3) three places:
Line: 74 - $xmlfeed = fgets($scfp, 8192);
Line: 88 - $page .= fread($xmlcache, 8192);
Line: 99 - $page .= fread($xmlcache, 8192);

Change 8192 to 16383.

This should pull 16K of data or 40 users worth of data.
__________________
http://www.szone.us | http://www.gzhq.net
Twitter | Facebook | My:Hacks @ vBulletin.org
Member of Kiwanis Club of Chatsworth
Reply With Quote
  #28  
Unread 05.25.11, 05:29 AM
Yngwiedis Yngwiedis is offline
Junior Member
 
Join Date: 04.11
Posts: 4
Now everything is ok.

Thank you very very much
Reply With Quote
  #29  
Unread 06.10.11, 04:32 PM
DJSourceCode DJSourceCode is offline
Member
 
Join Date: 06.11
Posts: 3
Could this be rigged to use XLS?

I love this script, but I wonder if there is a way to incorporate XLS or some other way to style the XML output.

I have tried for a few hours today to do this, but it just won't work for me.
Reply With Quote
  #30  
Unread 06.10.11, 05:58 PM
Zachariah Boren's Avatar
Zachariah Boren Zachariah Boren is offline
Administrator
 
Join Date: 02.07
Location: Canoga Park, CA
Posts: 928
Blog Entries: 6
Images: 10075
Send a message via ICQ to Zachariah Boren Send a message via MSN to Zachariah Boren Send a message via twitter to Zachariah Boren
Quote:
Originally Posted by DJSourceCode View Post
I love this script, but I wonder if there is a way to incorporate XLS or some other way to style the XML output.

I have tried for a few hours today to do this, but it just won't work for me.
The XML file is just a download of the output given by the shoutcast server.
You should be able to change the style in the file style.css

The HTML output of the script is in 2 files.
- index.php holds the <head>, <body>
- body.php displays everything else.
__________________
http://www.szone.us | http://www.gzhq.net
Twitter | Facebook | My:Hacks @ vBulletin.org
Member of Kiwanis Club of Chatsworth
Reply With Quote
Reply

Tags
php, shoutcast, standalone, status

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
[vB 3.6.x] Shoutcast Status 2.0 Zachariah Boren vBulletin 3.6x / 3.8x 22 08.27.12 10:34 AM
[PHP] Check your server for GD support Zachariah Boren Web Tips 1 08.31.10 07:12 PM
function.array-merge Argument #2 is not an array in modules vbgallery.php on line 49 niceguy vBulletin 5 12.30.07 09:57 AM
[PHP] CHMOD Recursive Zachariah Boren Web Tips 0 05.26.07 05:50 PM


All times are GMT -8. The time now is 05:57 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2007 - 20017 SZONE.US All rights reserved
You Rated this Thread: