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 name, country code, city name, region name, latitude, longitude and zip code information about IP address location.


Usage

  1. Include the Javascript resources into you pages <head> section

    <head>
     <script type="text/javascript" src="jquery-1.6.3.min.js"></script>
     <script type="text/javascript" src="jqIpLocation.js"></script>
    </head>
    
  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

Name Default Required Description
ip None Yes IP Address

Properties

NameDescription
location.country_nameCountry Name
location.country_codeCountry Code
location.cityCity Name
location.region_nameRegion Name
location.latitudeLatitude
location.longitudeLongitude
location.zipZip Code
  • Advertisement Advertise with us!