Get all detail from ip address

function ip_details($ip)
{

$json = unserialize(file_get_contents("http://ip-api.com/php/".$ip.""));

return $json;
}


and you get a response like
Array
(
    [city] => city name
    [timezone] => timezone
    [status] => success
    [regionName] => State
    [lat] => 26.223600387573
    [isp] => your operator name
    [as] => operator registration
    [query] => ipaddress
    [region] => statecode
    [zip] => zipcoe
    [org] => your broadband organizxatio
    [country] => country name
    [countryCode] => country code
    [lon] => 78.17919921875
)

Comments

Popular posts from this blog

Merge JS and CSS file to make your codeigniter website faster using CARABINER library