I did not create this method. Was searching for a way to show different ads to UK vs rest of EU vs ES, etc. Found it here:http://www.pokeraffiliatelistings.c...26347-geotarget-tool-non-wordpress-sites.html
Just copying it over to here, adapted with some Xenforo-specific details, so I don't...