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!).
I'm on Twitter!
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.