Main Content

What country are you in? How we find out on our web site

Archive - Originally posted on "The Horse's Mouth" - 2007-07-03 07:51:38 - Graham Ellis

Our web site recognises the country that you're browsing from ... and that allows us to display our phone number in the format that you would have to dial to reach us, and to advise visitors to our public course pages from more distant countries that they're looking at a product for UK delivery before they go ahead and make a booking. And our Traffic Watch Page lets us see the worldwide spread of visitors to our site too.

The database for this is not a small one - there's no easy algorithm that we can use to take an IP address (or any other part of a request to our server) and convert it into a zone or country - the database as a whole is over 1 Mb in size. And it has to be updated from time to time. Rather than try to do the job ourselves, we use the excellent Maxmind database which you'll find at http://www.maxmind.com/app/geoip_country under their flavour of the GPL License. 'Under the license agreement, all advertising materials and documentation mentioning features or use of this database must display the following acknowledgment: "This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/"'.

The results are claimed to be 98% accurate, and the circumstantial evidence that we have world tend to confirm that. We update regularly (though not every month, as Maxmind do), and we allow our users through our accessibility page to switch their country. I'll never forget a call from Gothenburg in Sweden made to our UK office ... which was to enquire about booking a public course which ended up running in Dublin, Ireland ...