IP Geolocation & IP Location Lookup API

ipwhoisio profile image IP Location API by ipwhois.io ใƒป1 min read

The service IP Geolocation is free for the test and small applications and sites.

Due to powerful and optimized servers located on different continents and productive database, achieve a real response of up to 90 milliseconds in most parts of the world.

PHP Library
Go to Github Project

PHP Function

$location = get_ipwhois($ip);
$decodedLocation = json_decode($location, true);

echo "<pre>";
echo "</pre>";

function get_ipwhois($ip, $format = "json", $lang = "en") {
    $url = "http://free.ipwhois.io/".$format."/".$ip."?lang=".$lang;
    $cURL = curl_init();

    curl_setopt($cURL, CURLOPT_URL, $url);
    curl_setopt($cURL, CURLOPT_HTTPGET, true);
    curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
        'Content-Type: application/json',
        'Accept: application/json'
    return curl_exec($cURL);

Posted on by:

ipwhoisio profile

IP Location API by ipwhois.io


Free IP Geolocation API and IP Location Lookup Database


markdown guide

Great. Thanks for sharing.

geo.ipify.com also provides powerful IP Location Lookup API