• 24-12-2016, 09:39:18
    #1
    Merhaba, mobil siteme giren masa üstünü, m.siteadı.com a girenleri yani siteadı.com a nasıl yönlendirebilirim?
  • 24-12-2016, 11:47:57
    #2
    Aşağıdaki kullanımı kendine göre düzenle.
    <?php
    $browser_type = $_SERVER["HTTP_USER_AGENT"]; 
     
     if( strpos($browser_type,'Chrome')){
      echo 'Chrome Kullanıyorsunuz..';
     }
     else if(strpos($browser_type, 'Firefox')){
      echo 'Firefox Kullanıyorsunuz..';
     }
     else if(strpos($browser_type, 'Android')){
      echo 'Android Kullanıyorsunuz..';
     }
     else if(strpos($browser_type, 'iPhone')){
      echo 'iPhone Kullanıyorsunuz..';
     }
     else if(strpos($browser_type, 'Windows Phone')){
      echo 'Windows Phone Kullanıyorsunuz..';
     }
     else if(strpos($browser_type, 'rv:11.0')){ //İnternet explorer 11 için
      echo "Explorer 11 Kullanıyorsunuz..";
     }
     else if(strpos($browser_type, 'Safari')){
      echo "Safari Kullanıyorsunuz..";
     }
     else if(strpos($browser_type, 'MSIE')){
      echo "internet explorer Kullanıyorsunuz..";
     }
    ?>
  • 24-12-2016, 12:11:36
    #3
    uguryildirim adlı üyeden alıntı: mesajı görüntüle
    Aşağıdaki kullanımı kendine göre düzenle.
    <?php
    $browser_type = $_SERVER["HTTP_USER_AGENT"]; 
     
     if( strpos($browser_type,'Chrome')){
      echo 'Chrome Kullanıyorsunuz..';
     }
     else if(strpos($browser_type, 'Firefox')){
      echo 'Firefox Kullanıyorsunuz..';
     }
     else if(strpos($browser_type, 'Android')){
      echo 'Android Kullanıyorsunuz..';
     }
     else if(strpos($browser_type, 'iPhone')){
      echo 'iPhone Kullanıyorsunuz..';
     }
     else if(strpos($browser_type, 'Windows Phone')){
      echo 'Windows Phone Kullanıyorsunuz..';
     }
     else if(strpos($browser_type, 'rv:11.0')){ //İnternet explorer 11 için
      echo "Explorer 11 Kullanıyorsunuz..";
     }
     else if(strpos($browser_type, 'Safari')){
      echo "Safari Kullanıyorsunuz..";
     }
     else if(strpos($browser_type, 'MSIE')){
      echo "internet explorer Kullanıyorsunuz..";
     }
    ?>
    Yorumunuz için teşekkürler fakat ben pek anlamıyorum bu tür şeylerden. m.diziizlettik.com sitesine masa üstü girerse eğer, diziizlettik.com sitesine yönlenmesini istiyorum ne yapılabilir? kodu düzenleyip yazabilir misiniz
  • 24-12-2016, 12:46:52
    #4
    Bu şekilde kullana bilirsin.
            $browser_type = $_SERVER["HTTP_USER_AGENT"];
    
            if( strpos($browser_type,'Android')){
                header('Location: http://m.diziizlettik.com');
            }
            else if(strpos($browser_type, 'iPhone')){
                header('Location: http://m.diziizlettik.com');
            }
            else if(strpos($browser_type, 'Windows Phone')){
                header('Location: http://m.diziizlettik.com');
            }else{
                header('Location: http://www.diziizlettik.com');
            }
  • 24-12-2016, 14:33:42
    #5
    uguryildirim adlı üyeden alıntı: mesajı görüntüle
    Bu şekilde kullana bilirsin.
            $browser_type = $_SERVER["HTTP_USER_AGENT"];
    
            if( strpos($browser_type,'Android')){
                header('Location: http://m.diziizlettik.com');
            }
            else if(strpos($browser_type, 'iPhone')){
                header('Location: http://m.diziizlettik.com');
            }
            else if(strpos($browser_type, 'Windows Phone')){
                header('Location: http://m.diziizlettik.com');
            }else{
                header('Location: http://www.diziizlettik.com');
            }
    biliyorum oldukça fazla rahatsız ettim ama, mybb de php kodu çalışmıyor ne yapmalıyım?