Proof-of-concept Shoutcast radio server in PHP

In 2005 I toyed with a Shoutcast server written in only PHP (and utilizing an external encoder). It didn’t get very far and the code became a mess, but that’s not to say that it wasn’t able to stream music. I got a simple HTTP server built to go along with all too. I didn’t get around to sending in-stream song title updates successfully in a non-hacky way though.

I just posted the code under GPLv3 if you want to check it out:
http://github.com/sk89q/phpshoutcastserver/tree/master

I don’t remember what bugs it has anymore, unfortunately. I’m pretty sure that there are were some skipping / blip issues that started occurring if you listened for a while. PHP is totally the wrong language to do this in too (it was just an experiment!).


2 Responses to Proof-of-concept Shoutcast radio server in PHP

  1. PHP Notice: Undefined variable: track
    _padding in K:\dev\webradio\audiosource.php on line 99
    PHP Notice: Undefined property: AudioSource::$data_chunk in K:\dev\webradio\aud
    iosource.php on line 101


    • Turn off notices. This was really quick code (and made several years ago), so don’t expect completeness.

      Plus, it’s just wrong doing this in PHP. You don’t have the backing of great libraries for audio processing, threading, etc., which is why I left the code in such an unfinished mess.


Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>