switched over to beyond hosting, and now my geo-redirection script doesnt work.
this is the script I WAS using
[PHP]<?php
if(isset($_SERVER['REMOTE_ADDR'])) {
include_once('geoip/geoip.inc');
$gi = geoip_open('geoip/GeoIP.dat',GEOIP_STANDARD);
$country = geoip_country_code_by_addr($gi,$_SERVER['REMOTE_ADDR']);
geoip_close($gi);
}else {
$country = '';
}
if($country=='US') {
header('Location: http://www.USofferHere.com/');
}else {
header('Location: http://www.internationalOfferHere.com/');
}
?>[/PHP]
with maxminds geoip.dat and geoip.inc files in the same folder. It worked perfectly fine until I switched hosting. This is the error I get:
"Fatal error: Cannot redeclare geoip_country_code_by_name() in /geoip/geoip.inc on line 346"
anybody have any idea what I can do? Facebook reviewers have been disapproving all my ads lately cause they are too lazy to look at it from the country that I am advertising it ins ip address
- Open the geoip.inc file
- Search for the geoip_country_code_by_name function
- Put this function between the following code:
We have the geoip module loaded on our servers, I think the geoip.inc file your loading is trying to load the module again under your suexec env. I remember a ticket about this recently, may have been you, may not.
Anyway, if you didn't get it working bump a ticket we will take care of ya!