Research & Reports

News & Notes

For Your Information

status == 'success') { // $geo = json_encode($query); // echo $geo; $geoObj = array(); $geoObj['ipAddr'] = $query->query; $geoObj['city'] = $query->city; $geoObj['state'] = $query->region; $geoObj['zip'] = $query->zip; $geoObj['timezone'] = $query->timezone; $geoObj['countryCode'] = $query->countryCode; $country = json_encode($geoObj['countryCode']); // $country = str_replace('"','',$country); // if (($country == '"US"') || ($country == '"GB"')) { if ($country == '"GB"') { echo '
'; echo '

Please Visit our UK Site

'; echo ''; echo '
'; } } function get_client_ip() { $ipaddress = ''; if (getenv('HTTP_CLIENT_IP')) $ipaddress = getenv('HTTP_CLIENT_IP'); else if (getenv('HTTP_X_FORWARDED_FOR')) $ipaddress = getenv('HTTP_X_FORWARDED_FOR'); else if (getenv('HTTP_X_FORWARDED')) $ipaddress = getenv('HTTP_X_FORWARDED'); else if (getenv('HTTP_FORWARDED_FOR')) $ipaddress = getenv('HTTP_FORWARDED_FOR'); else if (getenv('HTTP_FORWARDED')) $ipaddress = getenv('HTTP_FORWARDED'); else if (getenv('REMOTE_ADDR')) $ipaddress = getenv('REMOTE_ADDR'); else $ipaddress = 'UNKNOWN'; return $ipaddress; } ?>