It's always nice to collar a job through my web-site, and that's what happened when James of Akroweb in South Devon found me and put me in touch with Chris Cheverst. Chris is also based in Devon, and has been supplying TV listings for newspapers and magazines for quite a while. The logical next step is to launch something similar on the web. This used all the same back-office infrastructure that he'd put together to collate all the disparate channel listings. The end-product of that was a simple large text file in CSV format. This was straight-forward to parse with PHP using fgets and explode as the main tools.
Chris had a good idea of what he wanted and had crafted a neat PDF of the layout. We iterated implementations for a week or two, spiralling towards an attractive and functional layout in a surprisingly short time.
We also realised the need for a few add-ons, such as administrative tools to clear out a day of data in the odd cases where duplicates were loaded. There is a facility for optional adverts slotted in at the top of the hour. We call the PHP function file_exists to see if there is a JPG or GIF in a certain folder with an hour-related name. If so then load it. This allows flexibility as the demands of advertisers wax and wane, without any code changes.
As always, I chiselled away to get as near-perfect HTML validation status as was possible. I just love that Green Tick when Firefox and HTML Validator pronounce that all is well with your HTML and CSS. Using our own PHP rather than a CMS meant that the route to HTML validation was a bit easier: it did not depend on synchronising the actions of lots of other software layers.