Freelance Web Developer

Say Hi

Aug 2, 2010

Get Current Location with MaxMind

Due to mobility , It is important to consider physical location in web products. Determining user's current location can make a application more relevant. Today in this blog post we will learn to detect user's current location, with help of MaxMind JavaScript Web Service.


MaxMind Javascript Web Service is a service offered by MaxMind to return the Country, Region, City, Latitude, and Longitude for your web visitors.
It uses Javascript and is very easy to program, works on both static and dynamically served web pages.
In order to use this Javascript on your website, a link back to the website should be provided, or a license can be purchased for $250/year.


<script language="JavaScript" src=""></script>

<br>Country Code:
<script language="JavaScript">document.write(geoip_country_code());</script>

<br>Country Name:
<script language="JavaScript">document.write(geoip_country_name());</script>

<script language="JavaScript">document.write(geoip_city());</script> 

<script language="JavaScript">document.write(geoip_latitude());</script>

<script language="JavaScript">document.write(geoip_longitude());</script>


You can see the working demo here.

Related Articles

Play Sound onClick with JavaScript.
Typographic Animation with Jquery 
Top Programming Legends

Labels: , ,

By :