Merhaba Arkadaşlar,

aşağıdaki sistemi çalıştırdıgımda else'e düşüyorum problem nerde acaba yardımıcı olabilriseniz sevinirim.

<?php 
$ipaddress = $_SERVER['REMOTE_ADDR']; 
$locationstr = "http:api.locatorhq.com/?user=aaaz2568&key=cb70014a000193e4a21f8c5d546128d7ce231dae&ip=".$ipaddress."&format=xml"; 
  
$xml = simplexml_load_file($locationstr); 

$country = $xml->countryCode; 
echo $country; 

if (eregi ("TR", $country)) {   
header("Location:http://tr.siteadi.com"); 
} 
elseif (eregi ("ES", $country)) {   
header("Location:http://es.siteadi.com"); 
} 
elseif (eregi ("DE", $country)) {   
header("Location:http://de.siteadi.com"); 
} 
elseif (eregi ("FR", $country)) {   
header("Location:http://fr.siteadi.com"); 
} 
elseif (eregi ("JP", $country)) {   
header("Location:http://jp.siteadi.com"); 
} 
elseif (eregi ("UK", $country)) {   
header("Location:http://uk.siteadi.com"); 
} 
elseif (eregi ("MX", $country)) {   
header("Location:http://mx.siteadi.com"); 
} 
elseif (eregi ("NL", $country)) {   
header("Location:http://nl.siteadi.com"); 
} 
elseif (eregi ("RU", $country)) {   
header("Location:http://ru.siteadi.com"); 
} 
elseif (eregi ("BE", $country)) {   
header("Location:http://be.siteadi.com"); 
} 
else { echo "olmadi";}
?>