Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to get location from ip address in jQuery

The following example will demonstrate to you how to get location from IP Address in javascript/jQuery using IP Geolocation API. By using this api you can data in multiple formats such as JSON, XML, etc.

The API base URL is  Http://ip-api.com/json/{query}

{query} can be a single IPv4/IPv6 address or a domain name. If you don’t supply a query the current IP address will be used.

    • How to get current location in Google Maps using JavaScript

How to get location from IP address in jQuery

By using the following jquery geolocation Code snippet you will be able to get country, country code, region, regionName, city, zip, lat, lon, timezone, etc from IP address.

index.html



    How to get location from ip address in jQuery

Search any IP address/domain



Download Source Code

Conclusion

I hope you liked this article on how to get location from ip address in jquery. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.

The post How to get location from ip address in jQuery appeared first on DotNetTec.



This post first appeared on Asp Dot Net Tricks And Tips, Dot Net Coding Tips, Google Maps API Developer, please read the originial post: here

Share the post

How to get location from ip address in jQuery

×

Subscribe to Asp Dot Net Tricks And Tips, Dot Net Coding Tips, Google Maps Api Developer

Get updates delivered right to your inbox!

Thank you for your subscription

×