Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.133.153.110
<?php
function getLocationFromIP($ip)
{
$url = "https://ipinfo.io/".$ip;
// Generate curl request
$session = curl_init($url);
curl_setopt($session, CURLOPT_HEADER, false);
//curl_setopt($session, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
// obtain response
$response = curl_exec($session);
curl_close($session);
// print everything out
return $response;
}
?>
|