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:75128
Reply
Thread Tools Search this Thread Rating: Thread Rating: 8 votes, 5.00 average.
  #1  
Unread 02.18.07, 03:50 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
Standalone PHP Shoutcast Status

Updated: 03/27/2011

This is a standalone PHP shoutcast status script. This will report stats from your server to your website.

Hope it helps !!!

Quote:
SHOUTcast is a free-of-charge audio homesteading solution. It permits anyone
on the internet to broadcast audio from their PC to listeners across the Internet or any other IP-based network (Office LANs, college campuses, etc.).

SHOUTcast | Free internet radio!
Name:  online.jpg
Views: 14131
Size:  91.6 KB

==============================================
  • Server Name
  • Last 19 songs
  • 3 Popup players (quicktime, media player, real player)
  • DJ Name (source)
  • DJ ICQ (source)
  • DJ AIM (source)
  • DJ URL (source)
  • DJ Genre (source)
  • Bitrate
  • Current Song
  • Media Type
  • Most Ever Connected
  • Hit Count
  • Users Connected
  • Avj. Connect Time
  • User Max
  • IRC Server and Room
  • Online / Offline status
  • XML Data Cache
  • Ajax Refresh
  • Language Phrase File

================
13 images
5 php files
2 js files
1 css file
1 xml file

shoutcast105-php.zip - 7290 downloads
shoutcast107-php.zip - 1820 downloads
shoutcast108-php.zip - 3508 downloads
shoutcast109-php.zip - 4832 downloads
Attached Images
File Type: gif mp.gif (6.0 KB, 2714 views)
File Type: gif offline.gif (4.7 KB, 2298 views)
File Type: gif qt.gif (2.3 KB, 1562 views)
File Type: gif rp.gif (6.6 KB, 1925 views)
File Type: jpg dsp.jpg (38.7 KB, 927 views)
Attached Files
File Type: zip shoutcast20-php.zip (54.7 KB, 7808 views)
__________________
http://www.szone.us | http://www.gzhq.net
Twitter | Facebook | My:Hacks @ vBulletin.org
Member of Kiwanis Club of Chatsworth
Reply With Quote
  #2  
Unread 02.18.07, 03:53 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
Tested on:
- PHP 5.3.5
- Apache 2.2.17
- Chrome 10.0.6
- Internet Explorer 9
- Firefox 4.0

Variables used.
================================================== =====
If you choose not to show any/all:
Here is a list of variables that can be used. If do not wish to show data, just remove the variables.

$scdef = Default station name
$scip = IP shoutcast server
$scport = Port of shoutcast server
$scpass = Admin password (not DJ) to shoutcast server
$ircsite = IRC Server - EX: irc.server.com
$song[t] = Song History:t can range from 0-19. EX: $song[0], $song[1], $song[2] .... $song[19] ----- $song[0] (zerro) is the current song playing.
$servertitle = "Discription" - setting in DJ - DSP (I used for DJ Name).
$servergenre = - setting in DSP.
$bitrate = Quility of the Bitrate - setting in DJ - DSP .
$icq = ICQ# of DJ - setting in DJ - DSP.
$aim = AIM# of DJ - setting in DJ - DSP.
$irc = IRC room of DJ - setting in DJ - DSP.
$serverurl = URL - setting in DJ - DSP
$currentlisteners = Current connected users.
$maxlisteners = Max users for the server.
$irclink = irc://$ircsite/$irc
$listenamp = http://$scip:$scport/listen.pls
$listenlnk = http://$scip:$scport
$averagemin = average listener time in minuets
$song_history = $song[1] to song[19]


Changelog |
================================================== =====

2.0 - 03.27.2011
- jquery ajax refresh (no more hitting refresh !! )
- Added phrases in lang.php for translations
- Song history only shows when a song is played vs. 19 spaces
- Added source URL (DSP URL - $serverurl)
- Added error feedback for connection problems (debug)
- Added option to hide genre, aim, icq, irc, url if not in DSP source.

1.9 - 8.23.2009
- Cleaned up syntax for PHP5
- Fixed "Avj. Time" on line to display H,M,S

1.8 - 2.17.2006
- Added XML cache + timer
- Added AdminCP setting vs. edit the php file

1.7 - 12.25.2005
- Killed auto create Module on Install

1.6
- Fixed Media Player in non IE browsers
- Fixed Real Player in non IE browsers

1.5
- Added 19 song history vs. 5
- Added Windows Media Player popup
- Added Real Media Player popup
- Added Quicktime Media Player popup
- Added marquee to Curent song playing
- Added Avj. Connect Time (avj. of the total time users connected; untill server reboot)
- Added Media Type (tells what the source file format is: mpeg, CDA, WAV)
- Added Hit Count (total connections to the server since the server reboot)
- Added Most Ever (total connections at one time to the server since the server reboot)
- Added 4 images for choice of media player
__________________
http://www.szone.us | http://www.gzhq.net
Twitter | Facebook | My:Hacks @ vBulletin.org
Member of Kiwanis Club of Chatsworth
Reply With Quote
  #3  
Unread 02.18.07, 03:56 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
Faq

  • Problem:
Code:
Warning: fopen(shout.xml) [function.fopen]: failed to open stream: Permission denied in /home/www/config.php on line 60

Warning: fwrite(): supplied argument is not a valid stream resource in /home/www/config.php on line 61

Warning: fclose(): supplied argument is not a valid stream resource in /home/www/config.php on line 62
  • Answer:
CHMOD shout.xml 777
- this is the cache file that is updated on your local webserver
__________________
http://www.szone.us | http://www.gzhq.net
Twitter | Facebook | My:Hacks @ vBulletin.org
Member of Kiwanis Club of Chatsworth
Reply With Quote
  #4  
Unread 12.30.07, 08:25 AM
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
Most people pay for a shoutcast service, co-locate a server, host small servers on their local cable / dsl modem, or install via SSH to their web host.

Make sure you have Unlimited Bandwith on your web package.

The bandwith useage depends on "# of users connected" and the quility of the song in kbps.

uploadspeed / bitrate = max listeners , always leave some for overhead

Example: 256k upload speed / 56k bitrate = max 4 listeners ( 4* 56 = 224kbps ) keep in mind that your provider says he gives you 256kbps upload, the actual speed might be much lower.

Bitrates
192k CD quility
56k stereo
24k mono (like an AM radio, but works for music)
8k voice
__________________
http://www.szone.us | http://www.gzhq.net
Twitter | Facebook | My:Hacks @ vBulletin.org
Member of Kiwanis Club of Chatsworth
Reply With Quote
  #5  
Unread 12.30.07, 08:26 AM
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
HELP !! I Install the hack and I am always off line


To put less load on the shoutcast server and to speed up page loads. The shoutcast info the script gets is cached to your local webserver in that XML file. The XML file is called up when a request to show the data. If your cache file does not update then you are not connecting to the shoutcast server.

9 out of 10 times this is because of settings (port,ip,password) or your webhost has blocked ports. Many hosts only allow queries for data on port 80 (http, rss, xml feeds). I have seen many webhosts designate a port for "other" needs of their clients.

If you are 100% sure your setting and install is correct.

Send a ticket to your webhost and see if ports are blocked (ie:8000). If so they may give you another port you can use. Reset your shoutcast server to output on that port. Lastly, if there is nothing that your host will do, you can move the shoutcast server to output on port 80 vs. 8000.
__________________
http://www.szone.us | http://www.gzhq.net
Twitter | Facebook | My:Hacks @ vBulletin.org
Member of Kiwanis Club of Chatsworth
Reply With Quote
  #6  
Unread 04.02.09, 03:19 AM
Twittrblog Twittrblog is offline
Junior Member
 
Join Date: 04.09
Posts: 1
thx

nice script btw
Reply With Quote
  #7  
Unread 08.23.09, 06:28 AM
2Stoned 2Stoned is offline
Member
 
Join Date: 08.09
Posts: 1
Thumbs up You are amazing!

Hey Zachariah the new config file works like a charm!! Thank you so much for helping me out this fast i really appreciate.

What was the problem? Does it has anything to do that im am using php5?
Reply With Quote
  #8  
Unread 08.23.09, 11:10 AM
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
Yes, old code standards and new PHP5 was the issue.
- I have updated the build on the 1st post.

Changelog |
==========
- Cleaned up syntax for PHP5
- Fixed "Avj. Time" on line to display H,M,S
__________________
http://www.szone.us | http://www.gzhq.net
Twitter | Facebook | My:Hacks @ vBulletin.org
Member of Kiwanis Club of Chatsworth
Reply With Quote
  #9  
Unread 02.06.10, 06:51 PM
swive swive is offline
Junior Member
 
Join Date: 02.10
Posts: 1
Other Song Fields...

Zachariah -

Using your script - is it possible to access the other song fields - ie. website, duration, picture, etc?

Is this built in to the script, or something I would have to add myself?

Otherwise - great script. It really saved me ton of time.

-K
Reply With Quote
  #10  
Unread 03.18.10, 02:33 PM
plmok plmok is offline
Junior Member
 
Join Date: 03.10
Posts: 1
fsocket problem

Warning: fsockopen() [function.fsockopen]: unable to connect to radiovip.hopto.org:8787 (Connection timed out) in /home/andrei/public_html/radiovipnet/config.php on line 20

Warning: fsockopen() [function.fsockopen]: unable to connect to radiovip.hopto.org:8787 (Connection timed out) in /home/andrei/public_html/radiovipnet/config.php on line 39

I've got these erorrs. It is possible that the server where I publish de .php file have the port locked?
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 11:34 AM
[PHP] Check your server for GD support Zachariah Boren Web Tips 1 08.31.10 08:12 PM
function.array-merge Argument #2 is not an array in modules vbgallery.php on line 49 niceguy vBulletin 5 12.30.07 10:57 AM
[PHP] CHMOD Recursive Zachariah Boren Web Tips 0 05.26.07 06:50 PM


All times are GMT -8. The time now is 07:28 AM.


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: