Geo Location from IP address
The home page of ShareMyCab displays a basic map, centered on New York for the beta.
You can change it to your city by simply re-centering the map on it but one of the features of my roadmap was to personalize the map for each user. If you’re in Tokyo, London, Paris or New York, the Google map would be automatically centered on the city you are browsing from.
This is done by reading your IP and determining where you are browing from. The problem is that sometimes your company or ISP use proxies that are not physically in the cities where you are located. For instance, in my company, every internet connection around the world goes out through the headoffice - meaning that me, in New York, have an IP address that locates me in Paris. My mother, in Strasbourg, uses an ISP that “proxies” in Paris, just over 300 miles away.
I tested a few “IP to location” web services on 5 cities (Oslo, London, Paris, Strasbourg, New York), and here are the 3 that I shortlisted (worst to best):
- GeoIP from DMW Technologies: fast and cheap services ($15 for 50K requests). Worked well for Paris, New York, but issues with Strasbourg (not located correctly) and Oslo (user location not found).
- InfoSniper: works well for all locations, and pricing is the same as above, 10Eur for 50K requests. That might be the one I will use. Zip codes not available for all the locations …
- MaxMind: more advanced products, either on web services or to install server side. Pricing higher ($20 for 50K requests) however accuracy on details is higher too.
Installing the tool on Dreamhost: no fopen available, using cURL instead
Dreamhost doesn’t allow the fopen function for security reasons. You would normally open the result xml file from the webservice above and then parse it to get the information you need.
Paul Stamatiou has a simple cURL method to access your xml file. It took a minute to implement and configure the code, and the result is perfect.
If you enjoyed this post, make sure you subscribe to my RSS feed
or receive my posts by email !


Apple knows it job!iPhone 3G is the real stuff!Thanks for great review