Codebase updates

Posted Sunday July 20th 2008 from 53.3127, -6.2468

Ben has recently published some code for routing requests to the correct controllers and views in a PHP MVC framework, so I've spent some of my weekend integrating it into my codebase (yep, this is the sort of thing I do on weekends).

Mapping URLs to site functionality has always seemed quite clumsy in my projects to date; Ben's solution has quite a Rails feel to it and is definitely the most elegant method I have encountered to date.

Tagged , , and .

Distance between 2 pairs of lat long co-ordinates

Posted Monday October 29th 2007 from 53.3123, -6.2335

Based on examples by Chris Veness; functions for calculating the distance in miles or km between 2 pairs of latitude and longitude co-ordinates in PHP and JavaScript (also requires Number.prototype.round.js - because using Math.round() is just annoying).

Tagged , , , , and .

Pavatar class

Posted Tuesday July 17th 2007 from 53.3503, -6.2609

It has been available from my SVN repository for a while, but you can view my pavatar object source using Collaboa; it supports all 3 methods of retrieval and a caching mechanism, as required by the Pavatar 0.3.0 Candidate Recommendation

If anyone finds this useful enough to want to use it, I'm open to licensing suggestions.

Tagged and .

Uploading files with ActionScript 2.0 & PHP

Posted Monday July 9th 2007 from 51.4598, 0.0021

If you have to write some server side code (such as PHP) to receive a file being uploaded through HTTP POST from ActionScript 2.0 (such as in Flash 8 - here is a good tutorial) - the $_FILES['Filedata'] variable which PHP can access is something defined in the Flash internals - not something a Flash developer sets.

Hopefully this will save some PHP and Flash developers a few hours of headache.

Tagged , , and .