Another option is to use PHP's auto_prepend configuration. This will cause all scripts handled by PHP to run the script before the actual requested script runs, but after .htaccess (if you're using that).
This approach combined with some of the other suggestions (e.g. using MaxMind for geo location data and store views for specific regions) can result in a rather clean approach.
If you're running a version of Magento >= 1.4, the default store code can be configured by setting the $_SERVER['MAGE_RUN_CODE'] value.
In either the .htaccess file or apache's configuration add the following:
php_value auto_prepend_file /var/www/mystore/path/to/script.php
In your script.php
perform any necessary business logic and set the appropriate store code:
<?php
if (get_ip_location($_SERVER['REMOTE_ADDR']) == 'uk') {
$_SERVER['MAGE_RUN_CODE'] = 'store_code_uk';
} else {
$_SERVER['MAGE_RUN_CODE'] = 'store_code_us';
}
One thing to note is that this will apply for all PHP files requested, so you'll need to keep that in mind.