How To Get Client IP Address Using jQuery

It's only fair to share...Share on Facebook0Share on Google+0Tweet about this on Twitter0Share on LinkedIn0Pin on Pinterest0Digg thisShare on StumbleUpon0

jquery ip address

Using any server side programming language, its very easy to get the client IP address. But the things are moving towards from client side scripting, so we need a way so that we can get the client IP address using jQuery. In this tutorial, we are going to explain this by 2 free online services which allow us to get client IP address.

1. This is a free service providers that provide a client’s IP address in a JSON format with support for CORS, JSONP, and direct requests. It serves millions of requests each day for websites, servers, mobile devices and more from all around the world. Just write the 4 lines of code and we will get the client ip address


2. Smart IP for today is one of the leading services providing to it’s users all the required information about IP-addresses and everything related to them. It also can be achive by 4 lines of code


This is service also provide Geo location details as well like Country, latitude, longitude etc.Below are the properties which are returned in JSON response by this service.

  2. data.countryName;
  3. data.countryCode;
  5. data.region;
  6. data.latitude;
  7. data.longitude;
  8. data.timezone;

Leave a Reply

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


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">