I don’t believe anything generic for this is available (though would be worth searching the Extras repository), but it should be pretty straightforward to author a plugin which detects this information and modifies the request as needed, depending on your requirements of course.
Is there an addon that allows me to detect the location/country of an incoming visitor, and serve up specific site content based on the country?
$query = "http://geoip3.maxmind.com/a?l=" . $license_key . "&i=" . $ipaddress;
$url = parse_url($query);
$host = $url["host"];
$path = $url["path"] . "?" . $url["query"];
$timeout = 1;
$fp = fsockopen ($host, 80, $errno, $errstr, $timeout);
if ($fp) {
fputs ($fp, "GET $path HTTP/1.0\nHost: " . $host . "\n\n");
while (!feof($fp)) {
$buf .= fgets($fp, 128);
}
$lines = split("\n", $buf);
$country = $lines[count($lines)-1];
fclose($fp);
} else {
# enter error handing code here
}
echo $country;