HTML
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
js
.gitattributes
.gitignore
README.md
jqIpLocation.jquery.json
jqIpLocation_demo.html
loader.gif

README.md

jqIpLocation – jQuery IP Location Plugin

jqIpLocation is a jQuery Plugin that returns the location of an IP address in JSON format. You can get country, country code, city name, region name, latitude, longitude and zip code information about IP address location.

Plugin Homepage

Demo

Usage

1- Include the Javascript resources into you pages

 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
 <script type="text/javascript" src="jqIpLocation.js"></script>

2- Add the Javascript that will returns you IP Location information in JSON format

  $.jqIpLocation({
     ip : '208.80.152.201',
     success: function(location) {	          
        // location.country;
        // location.countryCode;
        // location.city;
        ...
     }
   });

Options

  • ip : IP Address that you want to get location info. It's required

JSON Result

  • location.country : Country Name
  • location.countryCode : Country Code
  • location.city : City Name
  • location.regionName : Region Name
  • location.lat : Latitude
  • location.lon : Longitude
  • location.zip : Zip Code

Demo

Plugin Homepage

Demo