The way this works is. the script will check the shoutcast server for the currently playing song. It then checks the title.txt for the same title info... if the title.txt file is empty, or it has different title info, it will send that data to twitter, and it will also write that to the title.txt file.
This script will ONLY update the title info if its different from the last time it checked, thus not posting the same title every min. (or however long you set your cron job for)
here is an example of a cron job that could be used:
*/10 * * * * wget -O /dev/null
http://www.domain.com/twittercast.php >> /dev/null 2>&1
things to keep in mind:
make sure the title.txt file is writable by your webserver (chmod 777 title.txt) and in the same directory as everything else.
make sure there actually IS title info on your shoutcast server..
just visit your shoutcast server in your browser to check that.
I am also posting a new version.
Changes:
Support for multiple servers
Added listener count to twitter output
Added page refresh for automatic in-browser updates
see working examples at www twitter com / dubstepfm