//********************************************************************* // begin geobytes latest method //********************************************************************* $client_ip = $ipaddr; // copied from Elxis variable above $tags=json_decode(file_get_contents('http://gd.geobytes.com/GetCityDetails?fqcn='. $client_ip), true); $geobyteslatitude = $tags['geobyteslatitude']; // get coordinates if you want to use $geobyteslongitude = $tags['geobyteslongitude']; // visual Google map link as shown below // values of country, city, etc... $body .= "country ".$tags['geobytescountry']."\n"; $body .= "region ".$tags['geobytesregion']."\n"; $body .= "city ".$tags['geobytescity']."\n"; $body .= "latitude ".$tags['geobyteslatitude']."\n"; $body .= "longitude ".$tags['geobyteslongitude']."\n"; $body .= 'http://maps.google.com/?q='.$geobyteslatitude.','.$geobyteslongitude.''."\n"; $body .= "\n\n"; //********************************************************************* // end geobytes //*********************************************************************
$ipaddr = $elxis->obj('ip')->clientIP(false, false);