PHP Shoutcast Server: Implement a Shoutcast music streaming server

Recommend this page to a friend!
  Info   View files (8)   Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
70%Total: 2,607 This week: 1All time: 1,453 This week: 255
Version License PHP version Categories
phpshoutcastserver 1.0.0GNU General Publi...5.0Networking, Audio
Description Author

This package can be used to implement a Shoutcast server to stream music.

It starts an HTTP server that accepts requests for music from a list of available songs in a given server directory.

It may also encode music tracks on the fly in MP3 format using the Lame program.

Innovation Award
PHP Programming Innovation award nominee
May 2009
Number 2

Prize: One copy of the Zend Studio
Shoutcast is a music streaming server program. Shoutcast source code is not available, so it cannot be customized directly. There is an equivalent Open Source project named IceCast, but it is written in C++.

This package provides a pure PHP implementation of a Shoutcast server, so it can easily be controlled from PHP.

Manuel Lemos
Picture of sk89q
Name: sk89q <contact>
Classes: 8 packages by
Country: United States United States
Age: 31
All time rank: 22525 in United States United States
Week rank: 243 20 in United States United States
Innovation award
Innovation award
Nominee: 5x

PHP Shoutcast Server
Copyright (c) 2005 and onward sk89q <>
Licensed under the GNU General Public License v3


* PHP 5.0 or later
* Sockets


PHP Shoutcast Server is a proof-of-concept Shoutcast server written
in PHP. The project was started 18 June, 2005. It encodes tracks on
the fly using LAME and has a very basic in-built HTTP server.


Open up config.php and change the path to point to a directory
containing MP3 files.

Download the LAME executable encoder and put it into the same directory.
xcLame.exe 3.92 was used during development.

Execute run.php through the command line.

To listen, connect to with a compatible player.

Sample output:
Playing: The Verve - Bitter Sweet Symphony (Instrumental version).mp3

<Users Listening: 1>
*        WinampMPEG/5.54

The HTTP server can be found at:
File Role Description
audiosource.php Class Generates the audio
config.php Conf. Configuration file
http.php Class HTTP server
LICENSE.txt Lic. License
README.txt Doc. Readme
run.php Example Runs the server
server.php Class Base server class
shoutcast.php Class Shoutcast server component

 Version Control Unique User Downloads Download Rankings  
This week:1
All time:1,453
This week:255
User Ratings User Comments (1)
 All time
thanks a bunch good wrk
7 years ago (William Eaton)

For more information send a message to info at phpclasses dot org.