F
fatihgoz
Misafir
ben yabancı ülkeden gelen ziyaretçileri başka sayfaya yönlendirmeyi istiyorum. Fakat kodda bi hata var. Lüttfen bana yardım edin.
<?PHP
$ziyaretci_ip = getenv(REMOTE_ADDR); // here we get ip from visitor
$ziyaretci_yer = file("http://www.hostip.info/api/get.html?ip=$ziyaretci_ip"); //we use a geoip service for getting ip information
$ziyaretci_yer = join ("", $ziyaretci_yer); // joining lines
if (eregi ("Turkey", $ziyaretci_yer))
{
header("Location:index.htm"); //
}
else { echo ("You should go to English pages!"); } // and we look for ip in Turkey because of finding turkish visitors
?>
<?PHP
$ziyaretci_ip = getenv(REMOTE_ADDR); // here we get ip from visitor
$ziyaretci_yer = file("http://www.hostip.info/api/get.html?ip=$ziyaretci_ip"); //we use a geoip service for getting ip information
$ziyaretci_yer = join ("", $ziyaretci_yer); // joining lines
if (eregi ("Turkey", $ziyaretci_yer))
{
header("Location:index.htm"); //
}
else { echo ("You should go to English pages!"); } // and we look for ip in Turkey because of finding turkish visitors
?>