Be the first to rate this file! 9 Downloads (last 30 days) File Size: 1.51 KB File ID: #41747

IP address lookup of country name, city name, latitude and longitude

by

 

Finds the country name, region name, city name, latitude and longitude from an IP address.

| Watch this File

File Information
Description

This function finds the country name, region name, city name, latitude and longitude from an IP address. It gets html from a website containing this data and scrapes the pertinents fields for the needed data.

Required Products MATLAB
MATLAB release MATLAB 7.12 (R2011a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
28 May 2013 Lee White

If you send numerous requests using this code you might get kicked off of the free site.

Here is another service which should remain free for more requests:
http://www.hostip.info/use.html

and here is the code to get the GPS/lat-long of a random IP address:

ip_as_string = '8.8.8.8';
params = {'ip',ip_as_string,'position','true'};
s = urlread('http://api.hostip.info/get_html.php','POST',params)

Contact us