Category Archives: Technology

Parsing CIF files to get train schedule data in PHP

I’ve had some fun looking at what data you can get via the National Rail Open Data scheme, and was really impressed by the ActiveMQ implementation they’ve got for Real Time Train Movement Messages!

The messages National Rail send allow you to plot trains to stations, or even along route, but the message only contains station IDs or train IDs – which is kinda boring. I like to visualise the data, on a map for example.

To get the station name and location for a particular train message one has to access an entirely different database, from another provider. Along comes ATOC with their CIF files, which look very scary compared to ActiveMQ.

To cut a long story as short as I can, the CIF files contain a lot of information (400MB+ files), using string length and new lines to split up the data. You can sign up to download the files on the ATOC website, and the specification for the files is available here.

Why the blog post? Well, I needed a way to parse these files to populate a Mongo database and wanted to promote the PHP CIF parser I’ve started work on: https://github.com/rb-cohen/php-cif-parser

 

Sql Server Reporting Services SOAP API methods

We’re (trying) to use the SSRS SOAP API at work with a PHP application. We found an open source SDK over at codeplex but soon found it to be badly written, outdated and broken!! We were forced to write our own…

It’s been an interesting process, and we hope to release our library as an Open Source SDK as soon as possible but in the mean time, if you need the documentation and are struggling to find it on MSDN (like we did), its here:¬†http://msdn.microsoft.com/en-us/library/reportservice2010.reportingservice2010.aspx

Hold out for our release, hopefully before the end of March 2011. If you’re interested in more information just leave a comment below!

P.S. That is the 2010 reference, which is what we’ll be coding for (i.e.¬†ReportService2010.asmx?wsdl)

PHP Kent

We’ve been struggling to fill a PHP development position at work and noticed a lack of community for PHP developers in the Kent area. There is PHP London and thats great, we head up there every month, but perhaps we could arrange an additional meetup closer to home!

For now we just want to see if we can find enough members (say 10+) to warrant starting the group, but as an additional service to agencies in Kent, we’ve set up a Kent PHP Job board, that agencies can post available positions to for free! We’ll be vetting submissions to keep the jobs relevant!

Napster web service won’t steam some songs

If you’re using the napster web service and find that random songs stop streaming properly, interrupting your (awesome) playlist, there may be a simple fix:

1. Clear your browser cache

If unsure how to do this, please google “clear [browser name] cache”, where browser name is either “Internet Explorer”, “Firefox”, “Chrome”, etc.

2. Clear your flash cache

I didn’t know about this one, but if you browse to the Flash Settings Manager page, you can delete your Flash cache.

3. For good luck, close your browser and re-open it

Seems to have done to trick for me, now I can listen to albums and playlists without playback stopping anymore! Only thing is the issue seems to reproduce itself every now and again.