Jean-Paul Thanks for the link to the MaxMind DB format. I may try to either write a parser from scratch or translate one from one of the other existing language implementations.
I looked at this last year and felt I could take the CSV files from the GeoIP v1 product and then get them into a SQLite database without too much aggro. I didn’t do it in the end as I felt I could cope without the data.
Once in the database, initial theory was just some clever SQL but that may be understating it.