Dynamic gig listings
I finally got fed up with updating gig listings in multiple locations so I did a little php voodoo last night to run all three listings (my front page, live page and MySpace) out of one file.
First I made a data file with all our gigs: giglist.txt.
Then I wrote a php script to parse that file and display the html data in the two different formats I need for my site:
Then I stole and hacked up this great tutorial by Bill Dickerson: How to Generate Dynamic HostBaby Calendars on MySpace that Scott sent me, to generate the third format, a dynamically generated jpeg image:
All I did really was skip all the Hostbaby specific stuff and then had to fix the object constructor and destructor to work with PHP 4 as there's no PHP 5 on this boat.
I'd like to add RSS or iCal feeds though I have a suspicion that'd be a lot of work and then nobody would use them. Anyway, if you want the source for any of this, just let me know.