Get City and Country and Client IP using JavaScript KTechBlog.com

This is the Free Api for Get City and Country and Client IP using JavaScript. You can Get Get Your Customers and visitors Location From IP,  Get Client’s IP Address, Location, And Other Data In JavaScript, Geolocation API,  How to Get IP Detail Using Javascript, How to Get IP Detail Using Jquery, Usage of ipinfo.io API, How to Get ip Detail Using ipinfo.io API.

You have to Following this Step to Get Clients IP and City etc. Data.

    1. Create HTML File
    2. Include JQuery in Your File
    3. <h1>Get City and Country and Client IP using JavaScript KTechBlog.com</h1>
          <div>
              <div>Your Ip Address : <span class="ip"></span></div>
              <div>Your City : <span class="city"></span></div>       
              <div>Your Region : <span class="region"></span></div>   
              <div>Your Country : <span class="country"></span></div>
          </div>
          
      <script src="jquery.min.js"></script>
          <script>
              $(document).ready(function(){
                  
                  $.get("http://ipinfo.io",function(response){
                      console.log(response);
                      $(".ip").html(response.ip);
                      $(".city").html(response.city);
                      $(".country").html(response.country);
                      $(".region").html(response.region);
                  },"jsonp");
              
              }); 
          </script>

This is the Complete Code of API. You have to Copy this Code and Paste in your File. For more Detail you can Watch our Video

Leave a Reply

Your email address will not be published. Required fields are marked *