Не работает: Код (Text): <?php include("geoip.inc"); $gi = geoip_open("GeoLiteCity.dat",GEOIP_STANDARD); $country_code = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']); geoip_close($gi); if($country_code == 'US') { header('Location: http://USTraffic.com'); } elseif($country_code == 'DE') { header('Location: http://DETraffic.com'); } elseif($country_code == 'GB') { header('Location: http://GBTraffic.com'); } elseif($country_code == 'CA') { header('Location: http://CATraffic.com'); } elseif($country_code == 'BR') { header('Location: http://BRTraffic.com'); } elseif($country_code == 'TR') { header('Location: http://TRTraffic.com'); } else { header('Location: http://AllTraffic.com'); } ?> Что не так?
Проверь, для начала, что у тебя лежит в $country_code на момент проверки. Бро, это основы дебага. if elseif elseif elseif Жуть какая. Почитай заодно про switch.