This is dbsong, a php/mysql web application which provides democratic music track selection.
It is designed to be used with Icecast2 and Ezstream to stream MP3s over a network.
The final result of my PHP code is actually very simple: when you run "php -f vote.php new_song",
it outputs the full path of an mp3 file. Ezstream takes this and passes it to icecast2, which
does the actual streaming.

Installation instructions:
- Edit dbsong/config.inc to the values you want (specifically, BASE_SONG_DIRECTORY and DB_PASSWORD must be changed)
- Change the user details on line 3 of initial_db to match the ones in config.inc
- Create the initial database: mysql -u root -p < initial_db
- Add a dbsong admin user: ./create_admin.sh
- Copy dbsong to /var/www/ (or wherever your web server wants the files)
- Check permissions - everything should probably be owned by user www-data and group www-data, and have permissions
   between 644 and 400 (i.e. www-data just needs read access, really, and that's it.)

- Configure Ezstream and Icecast2. This is mostly up to you, but I have included example icecast2 and
   ezstream config files. Just remember to change the passwords if you do use them!

  At the time of writing (when it was at version 0.4.0), ezstream requires a simple "playlist program"
   to run to get the next file to play. This is new_song_from_dbsong.sh, which just runs "php -f vote.php new_song".

  You can get icecast at http://www.icecast.org and ezstream at http://www.icecast.org/ezstream.php if they
   aren't included in your distribution.

  There's some good information on ezstream at http://www.gnuware.com/icecast/chap_09_05.html