teşekkürler radmin. bir de ülke ip sine göre yönlendirme bulabilirsek çok iyi olur.
<?
function ulkeBul($ip) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://ip-to-country.webhosting.info/node/view/36");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'ip_address='.$ip.'');
$kaynak = curl_exec ($ch);
curl_close ($ch);
preg_match("'belongs to <b>(.*?)</b>'s", $kaynak , $donen);
return $donen["1"];
}
?>Kullanımı:
$ulke=ulkeBul($_SERVER["REMOTE_ADDR"]);
if ($ulke=="Turkey") {
header("Location:index.php?lang=tr");
} else if ($ulke=="England") {
header("Location:indexen.php?lang=eng");
}kodlar ceaser'ındır