23 May 2014

How to find current location Latitude & Longitude based on the IP-address using JavaScript

<script language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></script>
 
<br>City:
<script language="JavaScript">document.write(geoip_city());</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>
<br>Region Name:
<script language="JavaScript">document.write(geoip_region_name());</script>
 <br>Postal Code:
<script language="JavaScript">document.write(geoip_postal_code());</script>
 <br>Latitude:
<script language="JavaScript">document.write(geoip_latitude());</script>
<br>Longitude:
<script language="JavaScript">document.write(geoip_longitude());</script>

No comments:

Post a Comment