Şöyle bir kod oluşturdum. Fakat nerde yanlış yapıyorum anlamadım, olmuyor.
<?php
$iphone6 = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone6");
$iphone4 = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone4");
$iphone5 = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone5");
$android = strpos($_SERVER['HTTP_USER_AGENT'],"Android");
$palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS");
$berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
$ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod");
$ios= strpos($_SERVER['HTTP_USER_AGENT'],"ios");
$samsung= strpos($_SERVER['HTTP_USER_AGENT'],"samsung");
$samsungnote4= strpos($_SERVER['HTTP_USER_AGENT'],"SM-N910CQ");
if ($iphone6 || $ios == true)
{
header('Location: http://www.m.telefoncu.com.tr/index.php?route=product/search&search=iphone%206');
//OR
echo "<script>window.location='http://www.m.telefoncu.com.tr/index.php?route=product/search&search=iphone%206'</script>";
}
elseif ($iphone5 || $ios == true)
{
header('Location: http://www.m.telefoncu.com.tr/index.php?route=product/search&search=iphone%205');
//OR
echo "<script>window.location='http://www.m.telefoncu.com.tr/index.php?route=product/search&search=iphone%205'</script>";
}
elseif ($iphone4 || $ios == true)
{
header('Location: http://www.m.telefoncu.com.tr/index.php?route=product/search&search=iphone%204');
//OR
echo "<script>window.location='http://www.m.telefoncu.com.tr/index.php?route=product/search&search=iphone%204'</script>";
}
elseif ($samsung == true)
{
header('Location: http://www.m.telefoncu.com.tr/index.php?route=product/search&search=samsung');
//OR
echo "<script>window.location='http://www.m.telefoncu.com.tr/index.php?route=product/search&search=samsung'</script>";
}elseif ($samsungnote4 || $samsung == true)
{
header('Location: http://www.telefoncu.com.tr/index.php?route=product/search&search=Samsung%20Galaxy%20Note%204');
//OR
echo "<script>window.location='http://www.telefoncu.com.tr/index.php?route=product/search&search=Samsung%20Galaxy%20Note%204'</script>";
}
?>Bu işlemi mobilcadde.com başarıyla uygulamış. Ben nasıl yapabilirim, bilen var mı?