Picking up incorrect location
-
Hi guys,
For some reason the incorrect country is now being picked up, it’s worked perfect until this week – I’m assuming it’s because it’s set to update the DB automatically.
This is what I have, but the body css just pulls in that your location is un the US when my ip is UK based.
<?php
$userInfo = geoip_detect2_get_info_from_current_ip();
if ($userInfo->country->isoCode == ‘US’){
// United States
echo ‘(+1) 844 335 1254’;
} elseif ($userInfo->country->isoCode == ‘AU’){
// Austrailia
echo ‘(+61) 1800 45 2335’;
} elseif ($userInfo->country->isoCode == ‘CA’){
// Canada
echo ‘(+1) 855 211 8639’;
} elseif ($userInfo->country->isoCode == ‘NZ’){
// New Zealand
echo ‘(+64) 800 955 010’;
} else {
// United Kingdom
echo ‘(+44) 844 561 7233’;
}
?>Thank you
- The topic ‘Picking up incorrect location’ is closed to new replies.