i tried to extract correct information about the visitor ip address:
ISP
Organization
City
Region
Country
i can extract this information by json_decode and file_get_contents:
$ip = $_SERVER['REMOTE_ADDR'];
$details = json_decode(file_get_contents("http://ipinfo.io/{$ip}")); // or from whatismyipaddress.com
echo $details->city;
and i also can write the code by my own(geoip)
but this is not the right way to extract this information(by using curl),
and the only website that returns correct information is http://whatismyipaddress.com/
i tried to use geoip but my php returns incorrect information.