• 13-05-2008, 00:17:04
    #10
    Kimlik doğrulama veya yönetimden onay bekliyor.
    php için sınıf şu şekilde

    class tarayiciTipi {
        var $tarayiciKimlik;
        function TarayiciAl() {
        
        $tarayici_am = stristr ( $_SERVER['HTTP_USER_AGENT'], "amaya"         );
        $tarayici_cb = stristr ( $_SERVER['HTTP_USER_AGENT'], "Crazy Browser" );
        $tarayici_mx = stristr ( $_SERVER['HTTP_USER_AGENT'], "Maxthon"       );
        $tarayici_ab = stristr ( $_SERVER['HTTP_USER_AGENT'], "Avant Browser" );
        $tarayici_fl = stristr ( $_SERVER['HTTP_USER_AGENT'], "Flock"         );
        $tarayici_ff = stristr ( $_SERVER['HTTP_USER_AGENT'], "Firefox"       );
        $tarayici_ns = stristr ( $_SERVER['HTTP_USER_AGENT'], "Netscape"      );
        $tarayici_sa = stristr ( $_SERVER['HTTP_USER_AGENT'], "Safari"        );
        $tarayici_ga = stristr ( $_SERVER['HTTP_USER_AGENT'], "Galeon"        );
        $tarayici_kq = stristr ( $_SERVER['HTTP_USER_AGENT'], "Konqueror"     );
        $tarayici_lx = stristr ( $_SERVER['HTTP_USER_AGENT'], "Lynx"          );
        $tarayici_op = stristr ( $_SERVER['HTTP_USER_AGENT'], "Opera"         );
        $tarayici_ie = stristr ( $_SERVER['HTTP_USER_AGENT'], "MSIE"          );
        
    
        if     ( $tarayici_am ) { $this->tarayiciKimlik = "am"; }
        elseif ( $tarayici_cb ) { $this->tarayiciKimlik = "cb"; }
        elseif ( $tarayici_mx ) { $this->tarayiciKimlik = "mx"; }
        elseif ( $tarayici_ab ) { $this->tarayiciKimlik = "ab"; }
        elseif ( $tarayici_fl ) { $this->tarayiciKimlik = "fl"; }
        elseif ( $tarayici_ns ) { $this->tarayiciKimlik = "ns"; }
        elseif ( $tarayici_sa ) { $this->tarayiciKimlik = "sa"; }
        elseif ( $tarayici_ga ) { $this->tarayiciKimlik = "ga"; }
        elseif ( $tarayici_kq ) { $this->tarayiciKimlik = "kq"; }
        elseif ( $tarayici_lx ) { $this->tarayiciKimlik = "lx"; }
        elseif ( $tarayici_op ) { $this->tarayiciKimlik = "op"; }
        elseif ( $tarayici_ff ) { $this->tarayiciKimlik = "ff"; }
        elseif ( $tarayici_ie ) { $this->tarayiciKimlik = "ie"; }
        else                     { $this->tarayiciKimlik =  "";  }
        
      }
      
    }
    ilgili sınıfın kullanımı şu şekilde

    include ( "tarayicitipi.php" );
    $tarayici = new tarayiciTipi();
    $tarayici->TarayiciAl();
    
    if ( $tarayici->tarayiciKimlik == "ff" )
    {
    echo "Devam";
    }
    else
    {
    // mesaj yada yönlendirme
    }
  • 13-05-2008, 00:51:07
    #11
    sitenin çok iyi olması gerek r10 gibi mesala yoksa hitini engellersin en az %60 70 hala turkiyede ie kullanıyor iyi düşün derim
  • 13-05-2008, 01:20:56
    #12
    ASP PHP farketmez ie bu siteye giremez


    <script type="text/javascript">
    var ie = "ie/index.html"; // internet ise yönlendir
    var firefox = "firefox/index.html"; // mozilla ise yönlendir
    var opera = "opera/index.html";
    var dflt = "firefox/index.html"; // default folder
    var browser = navigator.appName;
    document.write(browser);

    if(browser == "Microsoft Internet Explorer")
    {
    alert("İE Kullanıcıları Giremez :S");
    window.location.href = ie;
    }
    else if(browser == "Netscape")
    {
    alert("Haydi koçum içeri");
    window.location.href = firefox;
    }
    else if(browser == "Opera")
    {
    //alert("opera");
    window.location.href = opera;
    }
    else
    {
    window.location.hreg = dflt;
    }
    </script>
  • 13-05-2008, 01:23:32
    #13
    hmakdeniz adlı üyeden alıntı: mesajı görüntüle
    ASP PHP farketmez ie bu siteye giremez
    <script type="text/javascript">
    var ie = "ie/index.html"; // internet ise yönlendir
    var firefox = "firefox/index.html"; // mozilla ise yönlendir
    var opera = "opera/index.html";
    var dflt = "firefox/index.html"; // default folder
    var browser = navigator.appName;
    document.write(browser);
    if(browser == "Microsoft Internet Explorer")
    {
    alert("İE Kullanıcıları Giremez :S");
    window.location.href = ie;
    }
    else if(browser == "Netscape")
    {
    alert("Haydi koçum içeri");
    window.location.href = firefox;
    }
    else if(browser == "Opera")
    {
    //alert("opera");
    window.location.href = opera;
    }
    else
    {
    window.location.hreg = dflt;
    }
    </script>
    giren http://site.com/firefox/index.html diye girer (:
  • 13-05-2008, 10:21:04
    #14
    Her sayfada alltaki kodu uygularsın zaten dinamik bir sayfa ise include edebildiğiniz bir sayfa yeterli olur...

    tabi geçerli bir kod oldugunuda düşünüyorum demedim sadece bir öneri
    Bilgisayarı biraz bilen bir vatandaş javascript kodlarını kapatarak siteye girebilir.


    <script type="text/javascript">
    var ie = "ie/index.html"; // internet ise yönlendir
    var firefox = "firefox/index.html"; // mozilla ise yönlendir
    var opera = "opera/index.html";
    var dflt = "firefox/index.html"; // default folder
    var browser = navigator.appName;
    document.write(browser);
    if(browser == "Microsoft Internet Explorer")
    {
    //alert("İE Kullanıcıları Giremez :S");
    window.location.href = ie;
    }
    else if(browser == "Netscape")
    {
    //alert("Haydi koçum içeri");
    //window.location.href = firefox;
    }
    else if(browser == "Opera")
    {
    //alert("opera");
    window.location.href = opera;
    }
    else
    {
    window.location.hreg = dflt;
    }
    </script>