Peel me a Grape :: We make things work

We Make Things Work :: Blog

via Paul Walsh and Google Code Bloggoogle.loader.ClientLocation tells you the city, country, region, longitude and latitude based on the IP address of the client.

The gist is:

curl -i -s http://www.google.com/jsapi | grep ClientLocation

google.loader.ClientLocation = {"latitude":53.333,"longitude":-6.249,"address":
  {"city":"Dublin","region":"Dublin City","country":"Ireland","country_code":"IE"}};

Use http://www.google.com/jsapi and you get location information for free.

Nice!.

blog comments powered by Disqus