What

We provide a FREE, very easy to use service where you can get information on your visitor's latitude, longitude, IP address, city, state/province, country and country code.

Using this service, you can greet users in their local language, or show the flag of their country, or show items for sale near your visitor.

How

Just include a JavaScript reference to the free IP to Geocoding service in your html file:

<script type="text/javascript"
  src="http://freeipservices.com/ip2geo?v=1">
</script>

And you can call the following JavaScript functions - getLat(), getLng(), getCity(), getState() and getCountry().

To use the free geo2ip service, your page needs to include a div with id=_fis. This is the location on your page where freeIpServices.com will place an advertisement. If this div does not exist, the JavaScript inserts one, right where it is invoked.

Samples

1. Simplest, our Hello World, displays visitors location in a box. The following JavaScript fills in parts of the HTML with the values returned by our Geo functions:
<script type="text/javascript">
  document.getElementById("lat").innerHTML = getLat();
  document.getElementById("lng").innerHTML = getLng();
</script>
2. A map example, which gets visitors location information, then centers a Google map around it. In this example we are using the visitor's (yours) latitude and longitude to center the Google map, with:
<script type="text/javascript">
  var map = new GMap2(document.getElementById("map"));
  map.setCenter(new GLatLng(getLat(), getLng()), 12);
</script>

3. A more involved sample which gets visitors location information, then queries to get auto body shops in that area, and finally displays them on a Google map.

Example 1: Where is my visitor from?

Example 2: List of latest visitors

  1. flagWASHINGTON, DISTRICT OF COLUMBIA, US
  2. flagNEW YORK, NEW YORK, US
  3. flagSPOONER, WISCONSIN, US
  4. flagPOZNAN, WIELKOPOLSKIE, PL
  5. flagSALEM, OREGON, US
  6. flagROCKVILLE, MARYLAND, US

Example 3: Latest visitors on map