wmaraci reklam

JavaScript ile Ziyaretçi Bilgilerini Detaylı Öğrenelim

7 Mesajlar 1.361 Okunma
pst.net
wmaraci reklam

ontedi ontedi www.ontedi.com Kullanıcı
  • Üyelik 03.10.2013
  • Yaş/Cinsiyet 44 / E
  • Meslek Yazılım Uzmanı, Matematikçi
  • Konum Ankara
  • Ad Soyad S** T**
  • Mesajlar 1119
  • Beğeniler 325 / 324
  • Ticaret 2, (%100)
Sitemizi ziyaret eden kullanıcıya ait elde edebileceğimiz çeşitli bilgileri öğrenmek için güzel bir makale ile sizlerleyiz


Bildiğiniz üzere ziyareçiler web sitelerini ziyaret ettiklerinde kullandıkları tarayıcı çeşitli bilgiler barındırır. Böylece o kullanıcıya ait sınırlı bilgileri site sahipleri öğrenmiş olur. Bunun bir örneği olarak Google Analytics ve Yandex Metrika'yı örnek verebiliriz. Tabi o sistemlerinde benzer şekilde kendine has özellikleri de var. Biz onlar kadar gelişmiş olmasa da güzel bir şekilde kullanıcıdan aldığımız bilgileri değerlendirip kullanıcı profili hakkında iyice fikir edinebiliriz.
Kodlarımıza geçelim.
Ziyaretçinin Tarayıcı Bilgilerini Okuyalım
function fnZiyaretci_Bilgileri() {
var arrSonuc = [];
var strCihaz_Bilgisi = "Cihaz Bilgisi Bulunamadı";
var strIsletim_Sistemi = "İşletim Sistemi Bilgisi Bulunamadı";
var strTarayici_Bilgileri = navigator.userAgent;
var strReferans = document.referrer;
if (strTarayici_Bilgileri.indexOf("8063") > -1)
strCihaz_Bilgisi = "Alcatel OneTouch Pixi 4";

if (strTarayici_Bilgileri.indexOf("ASUS_T00K") > -1)
strCihaz_Bilgisi = "Asus Zenfone 5 Lite";
if (strTarayici_Bilgileri.indexOf("K00U") > -1)
strCihaz_Bilgisi = "Asus Memo Pad HD 7";
if (strTarayici_Bilgileri.indexOf("P00A") > -1)
strCihaz_Bilgisi = "Asus Zenpad 8.0";
if (strTarayici_Bilgileri.indexOf("ASUS_Z00LD") > -1)
strCihaz_Bilgisi = "Asus Zenfone 2 Laser";
if (strTarayici_Bilgileri.indexOf("ASUS_A007") > -1)
strCihaz_Bilgisi = "Asus Zenfone Live";
if (strTarayici_Bilgileri.indexOf("ASUS_Z012S") > -1)
strCihaz_Bilgisi = "Asus ZenFone 3";

if (strTarayici_Bilgileri.indexOf("T03 Build") > -1)
strCihaz_Bilgisi = "Acer T03";

if (strTarayici_Bilgileri.indexOf("MX089") > -1)
strCihaz_Bilgisi = "Chiligreen Tablet";

if (strTarayici_Bilgileri.indexOf("CASPER_VIA_M1") > -1)
strCihaz_Bilgisi = "Casper VIA M1";
if (strTarayici_Bilgileri.indexOf("VIA_T41") > -1)
strCihaz_Bilgisi = "Casper VIA T41";
if (strTarayici_Bilgileri.indexOf("Casper_VIA_V3") > -1)
strCihaz_Bilgisi = "Casper VIA V3";
if (strTarayici_Bilgileri.indexOf("CASPER_VIA_E1") > -1)
strCihaz_Bilgisi = "Casper VIA E1";
if (strTarayici_Bilgileri.indexOf("VIA_A1") > -1)
strCihaz_Bilgisi = "Casper VIA A1";
if (strTarayici_Bilgileri.indexOf("VIA-T7D") > -1)
strCihaz_Bilgisi = "Casper VIA T7D";
if (strTarayici_Bilgileri.indexOf("VIA-T7D") > -1)
strCihaz_Bilgisi = "Casper VIA T7D";
if (strTarayici_Bilgileri.indexOf("Casper_VIA_V10") > -1)
strCihaz_Bilgisi = "Casper Via V10";
if (strTarayici_Bilgileri.indexOf("Casper_VIA_V5") > -1)
strCihaz_Bilgisi = "Casper VIA V5";

if (strTarayici_Bilgileri.indexOf("Flyfix Q7") > -1)
strCihaz_Bilgisi = "Concord Flyfix Q7";

if (strTarayici_Bilgileri.indexOf("Ixion P140") > -1)
strCihaz_Bilgisi = "DEXP Ixion P140";

if (strTarayici_Bilgileri.indexOf("Dell Streak 7") > -1)
strCihaz_Bilgisi = "Dell Streak 7";

if (strTarayici_Bilgileri.indexOf("Quad A7") > -1)
strCihaz_Bilgisi = "Excon Quad A7";

if (strTarayici_Bilgileri.indexOf("DC-1215") > -1)
strCihaz_Bilgisi = "Everest Everpad DC-1215";

if (strTarayici_Bilgileri.indexOf("T8E Build") > -1)
strCihaz_Bilgisi = "Exper EasyPad T8E";
if (strTarayici_Bilgileri.indexOf("EasyPad T7C") > -1)
strCihaz_Bilgisi = "Exper Easypad T7C";

if (strTarayici_Bilgileri.indexOf("iPhone") > -1)
strCihaz_Bilgisi = "iPhone";

if (strTarayici_Bilgileri.indexOf("JERRY Build") > -1 && strTarayici_Bilgileri.indexOf("MRA58K") > -1)
strCihaz_Bilgisi = "Generic Android 6.x";

if (strTarayici_Bilgileri.indexOf("e-tab4") > -1)
strCihaz_Bilgisi = "General Mobile E Tab 4";
if (strTarayici_Bilgileri.indexOf("etab5") > -1)
strCihaz_Bilgisi = "General Mobile E Tab 5";
if (strTarayici_Bilgileri.indexOf("GM 5 Plus") > -1)
strCihaz_Bilgisi = "General Mobile GM5 Plus";
if (strTarayici_Bilgileri.indexOf("General Mobile 4G") > -1)
strCihaz_Bilgisi = "General Mobile 4G Android One";
if (strTarayici_Bilgileri.indexOf("Discovery Build/JOP40D") > -1)
strCihaz_Bilgisi = "General Mobile Discovery";
if (strTarayici_Bilgileri.indexOf("Discovery II Mini") > -1)
strCihaz_Bilgisi = "General Mobile Discovery 2 Mini";
if (strTarayici_Bilgileri.indexOf("GM Discovery II") > -1)
strCihaz_Bilgisi = "General Mobile Discovery 2";
if (strTarayici_Bilgileri.indexOf("GM 5 Build") > -1)
strCihaz_Bilgisi = "General Mobile GM 5";
if (strTarayici_Bilgileri.indexOf("GM 8 d") > -1)
strCihaz_Bilgisi = "General Mobile Gm 8 D";

if (strTarayici_Bilgileri.indexOf("GTB 701") > -1)
strCihaz_Bilgisi = "Grundig Style Tab 7";

if (strTarayici_Bilgileri.indexOf("NXT-L29") > -1)
strCihaz_Bilgisi = "Huawei Mate 8";
if (strTarayici_Bilgileri.indexOf("HUAWEI G7-L01") > -1)
strCihaz_Bilgisi = "Huawei Ascend G7";
if (strTarayici_Bilgileri.indexOf("T1-701u") > -1)
strCihaz_Bilgisi = "Huawei MediaPad T1";
if (strTarayici_Bilgileri.indexOf("HUAWEI P7-L10") > -1)
strCihaz_Bilgisi = "Huawei Ascend P7";
if (strTarayici_Bilgileri.indexOf("HUAWEI Y511-U30") > -1)
strCihaz_Bilgisi = "Huawei Ascend Y511";
if (strTarayici_Bilgileri.indexOf("ALE-L21") > -1)
strCihaz_Bilgisi = "Huawei P8 Lite";
if (strTarayici_Bilgileri.indexOf("HUAWEI KII-L21") > -1)
strCihaz_Bilgisi = "Huawei GR5";
if (strTarayici_Bilgileri.indexOf("HONORPLK-L01") > -1)
strCihaz_Bilgisi = "Huawei Honor 7";
if (strTarayici_Bilgileri.indexOf("MAR-LX1M") > -1)
strCihaz_Bilgisi = "Huawei P30 Lite";
if (strTarayici_Bilgileri.indexOf("LDN-L01") > -1)
strCihaz_Bilgisi = "Huawei Y7 2018";
if (strTarayici_Bilgileri.indexOf("POT-LX1") > -1)
strCihaz_Bilgisi = "Huawei P Smart 2019";
if (strTarayici_Bilgileri.indexOf("ANE-LX1") > -1)
strCihaz_Bilgisi = "Huawei P20 Lite";
if (strTarayici_Bilgileri.indexOf("FIG-LX1") > -1)
strCihaz_Bilgisi = "Huawei P Smart";

if (strTarayici_Bilgileri.indexOf("HTC One M8s") > -1)
strCihaz_Bilgisi = "HTC One M8s";
if (strTarayici_Bilgileri.indexOf("HTC 10") > -1)
strCihaz_Bilgisi = "HTC 10";
if (strTarayici_Bilgileri.indexOf("HTC Desire 816") > -1)
strCihaz_Bilgisi = "HTC Desire 816";
if (strTarayici_Bilgileri.indexOf("HTC Desire 820G PLUS") > -1)
strCihaz_Bilgisi = "HTC Desire 820G+";
if (strTarayici_Bilgileri.indexOf("HTC One_M8") > -1)
strCihaz_Bilgisi = "HTC One (M8)";
if (strTarayici_Bilgileri.indexOf("HTC One A9") > -1)
strCihaz_Bilgisi = "HTC One A9";
if (strTarayici_Bilgileri.indexOf("HTC Desire 828") > -1)
strCihaz_Bilgisi = "HTC Desire 828";
if (strTarayici_Bilgileri.indexOf("HTC Desire 626") > -1)
strCihaz_Bilgisi = "HTC Desire 626";

if (strTarayici_Bilgileri.indexOf("TPC7201") > -1)
strCihaz_Bilgisi = "HI-LEVEL Tablet";

if (strTarayici_Bilgileri.indexOf("ELITE TAB 8") > -1)
strCihaz_Bilgisi = "Hometech Elite Tab 8";
if (strTarayici_Bilgileri.indexOf("ULTRA TAB 8") > -1)
strCihaz_Bilgisi = "Hometech Ultra Tab 8";
if (strTarayici_Bilgileri.indexOf("HT_7R") > -1)
strCihaz_Bilgisi = "Hometech HT 7R";

if (strTarayici_Bilgileri.indexOf("KAAN N1") > -1)
strCihaz_Bilgisi = "Kaan N1";

if (strTarayici_Bilgileri.indexOf("WA-718QC-INTEL") > -1)
strCihaz_Bilgisi = "KAWAI WA-718QC";

if (strTarayici_Bilgileri.indexOf("HT-7Quad") > -1)
strCihaz_Bilgisi = "Korax Tablet";

if (strTarayici_Bilgileri.indexOf("P1a42") > -1)
strCihaz_Bilgisi = "Lenovo Vibe";
if (strTarayici_Bilgileri.indexOf("NPJS25") > -1)
strCihaz_Bilgisi = "Lenovo Moto G4";
if (strTarayici_Bilgileri.indexOf("S1La40") > -1)
strCihaz_Bilgisi = "Lenovo Vibe S1";
if (strTarayici_Bilgileri.indexOf("Lenovo K53a48") > -1)
strCihaz_Bilgisi = "Lenovo K6 Note";
if (strTarayici_Bilgileri.indexOf("Lenovo TB3-710F") > -1 || strTarayici_Bilgileri.indexOf("Lenovo TB3-850F") > -1)
strCihaz_Bilgisi = "Lenovo Tab 3";
if (strTarayici_Bilgileri.indexOf("Tab2A7-20F") > -1 || strTarayici_Bilgileri.indexOf("Tab2A7-10F") > -1)
strCihaz_Bilgisi = "Lenovo Tab 2";
if (strTarayici_Bilgileri.indexOf("Lenovo A3500-H") > -1)
strCihaz_Bilgisi = "Lenovo A7-50";
if (strTarayici_Bilgileri.indexOf("Lenovo A1010a20") > -1)
strCihaz_Bilgisi = "Lenovo A Plus";
if (strTarayici_Bilgileri.indexOf("Lenovo P1ma40") > -1)
strCihaz_Bilgisi = "Lenovo Vibe P1m";
if (strTarayici_Bilgileri.indexOf("Lenovo A7020a48") > -1)
strCihaz_Bilgisi = "Lenovo K5 Note";
if (strTarayici_Bilgileri.indexOf("LenovoA3300-H") > -1)
strCihaz_Bilgisi = "Lenovo A7-30";
if (strTarayici_Bilgileri.indexOf("Lenovo P2a42") > -1)
strCihaz_Bilgisi = "Lenovo P2";

if (strTarayici_Bilgileri.indexOf("LG-K430") > -1)
strCihaz_Bilgisi = "LG K10";
if (strTarayici_Bilgileri.indexOf("LG-D331") > -1)
strCihaz_Bilgisi = "Lg L Bello";
if (strTarayici_Bilgileri.indexOf("LG-H525") > -1)
strCihaz_Bilgisi = "LG G4c";
if (strTarayici_Bilgileri.indexOf("Nexus 5X") > -1)
strCihaz_Bilgisi = "LG Nexus 5X";
if (strTarayici_Bilgileri.indexOf("LG-P710") > -1)
strCihaz_Bilgisi = "LG Optimus L7 2";
if (strTarayici_Bilgileri.indexOf("H870") > -1)
strCihaz_Bilgisi = "LG G6";
if (strTarayici_Bilgileri.indexOf("H990") > -1)
strCihaz_Bilgisi = "LG V20";
if (strTarayici_Bilgileri.indexOf("H860") > -1)
strCihaz_Bilgisi = "LG G5 Dual";
if (strTarayici_Bilgileri.indexOf("H850") > -1)
strCihaz_Bilgisi = "LG G5";
if (strTarayici_Bilgileri.indexOf("H840") > -1)
strCihaz_Bilgisi = "LG G5 SE";
if (strTarayici_Bilgileri.indexOf("H960") > -1)
strCihaz_Bilgisi = "LG V10";
if (strTarayici_Bilgileri.indexOf("H961") > -1)
strCihaz_Bilgisi = "LG V10 Dual";
if (strTarayici_Bilgileri.indexOf("H815") > -1)
strCihaz_Bilgisi = "LG G4";
if (strTarayici_Bilgileri.indexOf("H818") > -1)
strCihaz_Bilgisi = "LG G4 Dual";
if (strTarayici_Bilgileri.indexOf("H959") > -1)
strCihaz_Bilgisi = "LG G Flex 2";
if (strTarayici_Bilgileri.indexOf("D855") > -1)
strCihaz_Bilgisi = "LG G3";
if (strTarayici_Bilgileri.indexOf("D802") > -1)
strCihaz_Bilgisi = "LG G2";
if (strTarayici_Bilgileri.indexOf("LG-H735") > -1)
strCihaz_Bilgisi = "LG G4 Beat";
if (strTarayici_Bilgileri.indexOf("LG-D682TR") > -1)
strCihaz_Bilgisi = "LG G Pro Lite";
if (strTarayici_Bilgileri.indexOf("LG-H540") > -1)
strCihaz_Bilgisi = "LG G4 Stylus";
if (strTarayici_Bilgileri.indexOf("LG-H542") > -1)
strCihaz_Bilgisi = "LG G4 Stylus Titan";
if (strTarayici_Bilgileri.indexOf("LG-D693TR") > -1)
strCihaz_Bilgisi = "LG G3 Stylus";
if (strTarayici_Bilgileri.indexOf("LG-K520") > -1)
strCihaz_Bilgisi = "LG Stylus 2";
if (strTarayici_Bilgileri.indexOf("LG-H502") > -1)
strCihaz_Bilgisi = "LG Magna";
if (strTarayici_Bilgileri.indexOf("LG-M250") > -1)
strCihaz_Bilgisi = "LG K10 2017";


if (strTarayici_Bilgileri.indexOf("LMY47V") > -1)
strCihaz_Bilgisi = "Google Nexus";
if (strTarayici_Bilgileri.indexOf("Nexus 11") > -1)
strCihaz_Bilgisi = "Google Nexus 11";

if (strTarayici_Bilgileri.indexOf("M-MP745GOx") > -1)
strCihaz_Bilgisi = "Mediacom SmartPad";
if (strTarayici_Bilgileri.indexOf("M-MP7S2K3G") > -1)
strCihaz_Bilgisi = "Mediacom SmartPad S2";

if (strTarayici_Bilgileri.indexOf("MT-404") > -1)
strCihaz_Bilgisi = "Novapad Mt-404";

if (strTarayici_Bilgileri.indexOf("Lumia 520") > -1)
strCihaz_Bilgisi = "Nokia Lumia 520";
if (strTarayici_Bilgileri.indexOf("Lumia 525") > -1)
strCihaz_Bilgisi = "Nokia Lumia 525";
if (strTarayici_Bilgileri.indexOf("Lumia 535") > -1)
strCihaz_Bilgisi = "Nokia Lumia 535";
if (strTarayici_Bilgileri.indexOf("Lumia 625") > -1)
strCihaz_Bilgisi = "Nokia Lumia 625";
if (strTarayici_Bilgileri.indexOf("Lumia 630") > -1)
strCihaz_Bilgisi = "Nokia Lumia 630";
if (strTarayici_Bilgileri.indexOf("Lumia 820") > -1)
strCihaz_Bilgisi = "Nokia Lumia 820";
if (strTarayici_Bilgileri.indexOf("Lumia 950") > -1)
strCihaz_Bilgisi = "Nokia Lumia 950";
if (strTarayici_Bilgileri.indexOf("Lumia 1320") > -1)
strCihaz_Bilgisi = "Nokia Lumia 1320";
if (strTarayici_Bilgileri.indexOf("Nokia603") > -1)
strCihaz_Bilgisi = "Nokia 603";
if (strTarayici_Bilgileri.indexOf("TA-1033") > -1)
strCihaz_Bilgisi = "Nokia 6";

if (strTarayici_Bilgileri.indexOf("PIRANHA_PREMIUM_Z_TAB_9.0") > -1)
strCihaz_Bilgisi = "Piranha Premium Z Tab 9.0";
if (strTarayici_Bilgileri.indexOf("IQ_dream") > -1)
strCihaz_Bilgisi = "Piranha IQ Dreams";
if (strTarayici_Bilgileri.indexOf("7008 Tablet PC") > -1)
strCihaz_Bilgisi = "Piranha 7008";

if (strTarayici_Bilgileri.indexOf("DRN-X500") > -1)
strCihaz_Bilgisi = "Powerway Drn-X500 Dreamtab";

if (strTarayici_Bilgileri.indexOf("Polypad_M8") > -1)
strCihaz_Bilgisi = "PolyPad M8";

if (strTarayici_Bilgileri.indexOf("P11") > -1)
strCihaz_Bilgisi = "Reeder P11";
if (strTarayici_Bilgileri.indexOf("reederA7iC") > -1)
strCihaz_Bilgisi = "Reeder A7iC";
if (strTarayici_Bilgileri.indexOf("reeder A7i Quad") > -1)
strCihaz_Bilgisi = "Reeder A7i Quad";
if (strTarayici_Bilgileri.indexOf("reeder A7iX") > -1)
strCihaz_Bilgisi = "Reeder A7iX";
if (strTarayici_Bilgileri.indexOf("reeder_A8i_Quad") > -1)
strCihaz_Bilgisi = "Reeder A8i Quad";
if (strTarayici_Bilgileri.indexOf("M7Plus") > -1)
strCihaz_Bilgisi = "Reeder M7 Plus";
if (strTarayici_Bilgileri.indexOf("A8i-Q2") > -1)
strCihaz_Bilgisi = "Reeder A8i Q2";

if (strTarayici_Bilgileri.indexOf("SM-G610F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J7 Prime";
if (strTarayici_Bilgileri.indexOf("SM-A510F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A5 2016";
if (strTarayici_Bilgileri.indexOf("SM-J110H") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J1 Ace";
if (strTarayici_Bilgileri.indexOf("SM-J510FQ") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J5 2016";
if (strTarayici_Bilgileri.indexOf("SM-J500F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J5";
if (strTarayici_Bilgileri.indexOf("SM-G360H") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Core Prime";
if (strTarayici_Bilgileri.indexOf("SM-J200F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J7 2016";
if (strTarayici_Bilgileri.indexOf("SM-J700H") > -1 || strTarayici_Bilgileri.indexOf("SM-J700F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J7";
if (strTarayici_Bilgileri.indexOf("SM-J710FQ") > -1 || strTarayici_Bilgileri.indexOf("SM-J710F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J7 2016";
if (strTarayici_Bilgileri.indexOf("GT-I9000") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S";
if (strTarayici_Bilgileri.indexOf("GT-I9060") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Grand Neo";
if (strTarayici_Bilgileri.indexOf("GT-I9060I") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Grand Neo Plus";
if (strTarayici_Bilgileri.indexOf("SM-G7102") > -1 || strTarayici_Bilgileri.indexOf("SM-G710") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Grand 2";
if (strTarayici_Bilgileri.indexOf("GT-S5570I") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Mini";
if (strTarayici_Bilgileri.indexOf("GT-I9100") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S2";
if (strTarayici_Bilgileri.indexOf("GT-I9300") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S3";
if (strTarayici_Bilgileri.indexOf("GT-I8190") > -1 || strTarayici_Bilgileri.indexOf("GT-I8200Q") > -1 || strTarayici_Bilgileri.indexOf("GT-I8200N") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S3 Mini";
if (strTarayici_Bilgileri.indexOf("GT-I9500") > -1 || strTarayici_Bilgileri.indexOf("GT-I9505") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S4";
if (strTarayici_Bilgileri.indexOf("SM-I9505") > -1 || strTarayici_Bilgileri.indexOf("SM-G900F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S5";
if (strTarayici_Bilgileri.indexOf("SM-G920F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S6";
if (strTarayici_Bilgileri.indexOf("SM-G930F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S7";
if (strTarayici_Bilgileri.indexOf("SM-A800F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A8";
if (strTarayici_Bilgileri.indexOf("SM-C7000") > -1)
strCihaz_Bilgisi = "Samsung Galaxy C7";
if (strTarayici_Bilgileri.indexOf("SM-A9000") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A9";
if (strTarayici_Bilgileri.indexOf("SM-G925F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S6 Edge";
if (strTarayici_Bilgileri.indexOf("SM-A720F") > -1 || strTarayici_Bilgileri.indexOf("SM-A700F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A7";
if (strTarayici_Bilgileri.indexOf("SM-C7010") > -1)
strCihaz_Bilgisi = "Samsung Galaxy C7 Pro";
if (strTarayici_Bilgileri.indexOf("SM-C9000") > -1)
strCihaz_Bilgisi = "Samsung Galaxy C9 Pro";
if (strTarayici_Bilgileri.indexOf("SM-G930FD") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S7 Duos";
if (strTarayici_Bilgileri.indexOf("SM-G935F/DS") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S7 edge Duos";
if (strTarayici_Bilgileri.indexOf("SM-G935F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S7 edge";
if (strTarayici_Bilgileri.indexOf("SM-G950F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S8";
if (strTarayici_Bilgileri.indexOf("SM-G955F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S8+";
if (strTarayici_Bilgileri.indexOf("GT-N7000") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Note";
if (strTarayici_Bilgileri.indexOf("GT-N7100") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Note 2";
if (strTarayici_Bilgileri.indexOf("SM-N900") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Note 3";
if (strTarayici_Bilgileri.indexOf("SM-N910C") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Note 4";
if (strTarayici_Bilgileri.indexOf("SM-N920") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Note 5";
if (strTarayici_Bilgileri.indexOf("SM-N930F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Note 7";
if (strTarayici_Bilgileri.indexOf("SM-T211") > -1 || strTarayici_Bilgileri.indexOf("SM-T315") > -1 || strTarayici_Bilgileri.indexOf("SM-T310") > -1 || strTarayici_Bilgileri.indexOf("SM-T210") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab 3";
if (strTarayici_Bilgileri.indexOf("SM-T113") > -1 || strTarayici_Bilgileri.indexOf("SM-T116NQ") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab 3 Lite";
if (strTarayici_Bilgileri.indexOf("SM-T111NQ") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab 3 Lite 7.0";
if (strTarayici_Bilgileri.indexOf("SM-G600FY") > -1 || strTarayici_Bilgileri.indexOf("SM-G600F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy On7";
if (strTarayici_Bilgileri.indexOf("SM-A310F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A3";
if (strTarayici_Bilgileri.indexOf("SM-T230") > -1 || strTarayici_Bilgileri.indexOf("SM-T231") > -1 || strTarayici_Bilgileri.indexOf("SM-T335") > -1 || strTarayici_Bilgileri.indexOf("SM-T232") > -1 || strTarayici_Bilgileri.indexOf("SM-T532") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab 4";
if (strTarayici_Bilgileri.indexOf("GT-S7390") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Trend Lite";
if (strTarayici_Bilgileri.indexOf("SM-N7500Q") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Note 3 Neo";
if (strTarayici_Bilgileri.indexOf("SM-J200H") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J2 Duos";
if (strTarayici_Bilgileri.indexOf("GT-I9190") > -1 || strTarayici_Bilgileri.indexOf("GT-I9195") > -1 || strTarayici_Bilgileri.indexOf("GT-I9192") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S4 Mini";
if (strTarayici_Bilgileri.indexOf("GT-P3105") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab 2";
if (strTarayici_Bilgileri.indexOf("GT-P3110") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab 2 7.0";
if (strTarayici_Bilgileri.indexOf("GT-P5110") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab 2 10.1";
if (strTarayici_Bilgileri.indexOf("GT-S7580") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Trend Plus";
if (strTarayici_Bilgileri.indexOf("SM-A300H") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A3 Duos";
if (strTarayici_Bilgileri.indexOf("GT-I9301Q") > -1 || strTarayici_Bilgileri.indexOf("GT-I9301I") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S3 Neo";
if (strTarayici_Bilgileri.indexOf("SM-G7105L") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Grand 2 LTE";
if (strTarayici_Bilgileri.indexOf("SM-J510FN") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J5 2016";
if (strTarayici_Bilgileri.indexOf("SM-E700F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy E7";
if (strTarayici_Bilgileri.indexOf("SM-T110") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab 3 8GB";
if (strTarayici_Bilgileri.indexOf("SM-A710F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A7 2016";
if (strTarayici_Bilgileri.indexOf("SM-G800H") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S5 Mini Duos";
if (strTarayici_Bilgileri.indexOf("SM-E500H") > -1)
strCihaz_Bilgisi = "Samsung Galaxy E5";
if (strTarayici_Bilgileri.indexOf("SM-T562") > -1 || strTarayici_Bilgileri.indexOf("SM-T560") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab E";
if (strTarayici_Bilgileri.indexOf("SM-A810F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A8 2016";
if (strTarayici_Bilgileri.indexOf("SM-G850FQ") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Alpha";
if (strTarayici_Bilgileri.indexOf("SM-T350") > -1 || strTarayici_Bilgileri.indexOf("SM-T350") > -1 || strTarayici_Bilgileri.indexOf("SM-P580") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab A";
if (strTarayici_Bilgileri.indexOf("SM-G530F") > -1 || strTarayici_Bilgileri.indexOf("SM-G531H") > -1 || strTarayici_Bilgileri.indexOf("SM-G530H") > -1 || strTarayici_Bilgileri.indexOf("SM-G531F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Grand Prime";
if (strTarayici_Bilgileri.indexOf("SM-J100H") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J1";
if (strTarayici_Bilgileri.indexOf("SM-G532F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Grand Prime Plus";
if (strTarayici_Bilgileri.indexOf("GT-P7500") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab 10.1";
if (strTarayici_Bilgileri.indexOf("GT-N8005") > -1 || strTarayici_Bilgileri.indexOf("GT-N8010") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Note 10.1";
if (strTarayici_Bilgileri.indexOf("GT-P7300") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab 8.9";
if (strTarayici_Bilgileri.indexOf("SM-T800") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab S 10.5";
if (strTarayici_Bilgileri.indexOf("SM-T700") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab S 8.4";
if (strTarayici_Bilgileri.indexOf("SM-P602") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Note 10.1 2014 Edition";
if (strTarayici_Bilgileri.indexOf("SM-G355H") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Core 2";
if (strTarayici_Bilgileri.indexOf("SM-G570F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J5 Prime";
if (strTarayici_Bilgileri.indexOf("GT-P5210") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab 3 10.1";
if (strTarayici_Bilgileri.indexOf("GT-S7562") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S Duos";
if (strTarayici_Bilgileri.indexOf("SM-T520") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab Pro 10.1";
if (strTarayici_Bilgileri.indexOf("GT-N5110") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Note 8.0";
if (strTarayici_Bilgileri.indexOf("SM-A500H") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A5 Duos";
if (strTarayici_Bilgileri.indexOf("SM-A500F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A5";
if (strTarayici_Bilgileri.indexOf("GT-I9082") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Grand Duos";
if (strTarayici_Bilgileri.indexOf("SM-J800FN") > -1 || strTarayici_Bilgileri.indexOf("SM-J810F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J8";
if (strTarayici_Bilgileri.indexOf("SM-G800F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S5 Mini";
if (strTarayici_Bilgileri.indexOf("GT-S7272") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Ace 3";
if (strTarayici_Bilgileri.indexOf("SM-T580") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Tab A";
if (strTarayici_Bilgileri.indexOf("SM-A320F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A3 2017";
if (strTarayici_Bilgileri.indexOf("SM-J730F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J7 2017";
if (strTarayici_Bilgileri.indexOf("SM-J106H") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J1 Mini Prime";
if (strTarayici_Bilgileri.indexOf("GT-S7262") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Star Pro";
if (strTarayici_Bilgileri.indexOf("SM-N915F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Note Edge";
if (strTarayici_Bilgileri.indexOf("SM-J701F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J7 Core";
if (strTarayici_Bilgileri.indexOf("SM-G361H") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Core Prime";
if (strTarayici_Bilgileri.indexOf("SM-M205F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy M20";
if (strTarayici_Bilgileri.indexOf("SM-A505F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A50";
if (strTarayici_Bilgileri.indexOf("SM-A105F") > -1 || strTarayici_Bilgileri.indexOf("SM-A105G") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A10";
if (strTarayici_Bilgileri.indexOf("SM-N950F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy Note 8";
if (strTarayici_Bilgileri.indexOf("SM-G611F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy J7 Prime 2";
if (strTarayici_Bilgileri.indexOf("SM-G960F") > -1)
strCihaz_Bilgisi = "Samsung Galaxy S9";
if (strTarayici_Bilgileri.indexOf("SM-A705FN") > -1)
strCihaz_Bilgisi = "Samsung Galaxy A70";

if (strTarayici_Bilgileri.indexOf("C6903") > -1)
strCihaz_Bilgisi = "Sony Xperia Z1";
if (strTarayici_Bilgileri.indexOf("C6603") > -1)
strCihaz_Bilgisi = "Sony Xperia Z";
if (strTarayici_Bilgileri.indexOf("D2403") > -1)
strCihaz_Bilgisi = "Sony Xperia M2 Aqua";
if (strTarayici_Bilgileri.indexOf("D6503") > -1)
strCihaz_Bilgisi = "Sony Xperia Z2";
if (strTarayici_Bilgileri.indexOf("D6653") > -1)
strCihaz_Bilgisi = "Sony Xperia Z3";
if (strTarayici_Bilgileri.indexOf("E6603") > -1)
strCihaz_Bilgisi = "Sony Xperia Z5";
if (strTarayici_Bilgileri.indexOf("E6633") > -1)
strCihaz_Bilgisi = "Sony Xperia Z5 Dual";
if (strTarayici_Bilgileri.indexOf("D2005") > -1)
strCihaz_Bilgisi = "Sony Xperia E1";
if (strTarayici_Bilgileri.indexOf("F3211") > -1)
strCihaz_Bilgisi = "Sony Xperia XA Ultra";
if (strTarayici_Bilgileri.indexOf("E2003") > -1)
strCihaz_Bilgisi = "Sony Xperia E4g";
if (strTarayici_Bilgileri.indexOf("D2303") > -1)
strCihaz_Bilgisi = "Sony Xperia M2";
if (strTarayici_Bilgileri.indexOf("ST23i") > -1)
strCihaz_Bilgisi = "Sony Xperia Miro";

if (strTarayici_Bilgileri.indexOf("SN7011S") > -1)
strCihaz_Bilgisi = "Sunny SN7011";

if (strTarayici_Bilgileri.indexOf("SYX-T700") > -1)
strCihaz_Bilgisi = "Syrox T700";

if (strTarayici_Bilgileri.indexOf("teXet X-maxi qHD") > -1)
strCihaz_Bilgisi = "Texet X-maxi qHD";

if (strTarayici_Bilgileri.indexOf("Neffos C5") > -1)
strCihaz_Bilgisi = "TP-LINK Neffos C5";

if (strTarayici_Bilgileri.indexOf("TURKCELL T50") > -1)
strCihaz_Bilgisi = "Turkcell T50";
if (strTarayici_Bilgileri.indexOf("TURKCELL T60") > -1)
strCihaz_Bilgisi = "Turkcell T60";
if (strTarayici_Bilgileri.indexOf("TURKCELL T70") > -1)
strCihaz_Bilgisi = "Turkcell T70";
if (strTarayici_Bilgileri.indexOf("Turkcell_T_Tablet") > -1)
strCihaz_Bilgisi = "Turkcell T Tablet";
if (strTarayici_Bilgileri.indexOf("Turkcell Maxi Plus 5") > -1)
strCihaz_Bilgisi = "Turkcell MaxiPlus5";

if (strTarayici_Bilgileri.indexOf("Turk ******* TT175") > -1)
strCihaz_Bilgisi = "Türk ******* TT175";

if (strTarayici_Bilgileri.indexOf("Venus_V3_5040") > -1)
strCihaz_Bilgisi = "Vestel Venus V3 5040";
if (strTarayici_Bilgileri.indexOf("VSP250s") > -1)
strCihaz_Bilgisi = "Vestel Venus 5.0 V";
if (strTarayici_Bilgileri.indexOf("V_TAB_7_LITE_III") > -1)
strCihaz_Bilgisi = "Vestel V Tab 7 Lite III";
if (strTarayici_Bilgileri.indexOf("Vestel_5000") > -1)
strCihaz_Bilgisi = "Vestel Venus 5000";
if (strTarayici_Bilgileri.indexOf("Venus_V3_5580") > -1)
strCihaz_Bilgisi = "Vestel Venus V3 5580";
if (strTarayici_Bilgileri.indexOf("Venus_V3_5010") > -1)
strCihaz_Bilgisi = "Vestel Venus V3 5010";
if (strTarayici_Bilgileri.indexOf("Venus_V3_5070") > -1)
strCihaz_Bilgisi = "Vestel Venus V3 5070";
if (strTarayici_Bilgileri.indexOf("V_TAB_7025") > -1)
strCihaz_Bilgisi = "Vestel V Tab 7025";
if (strTarayici_Bilgileri.indexOf("V_TAB_7_LITE_II") > -1)
strCihaz_Bilgisi = "Vestel V Tab 7\" Lite II";
if (strTarayici_Bilgileri.indexOf("Venus_V3_5570") > -1)
strCihaz_Bilgisi = "Vestel Venus V3 5570";
if (strTarayici_Bilgileri.indexOf("Vestel_5530") > -1)
strCihaz_Bilgisi = "Vestel Venus 5530";

if (strTarayici_Bilgileri.indexOf("SmartTab10") > -1)
strCihaz_Bilgisi = "Vodafone Smart Tab 10";
if (strTarayici_Bilgileri.indexOf("VFD 600") > -1)
strCihaz_Bilgisi = "Vodafone Smart Style 7";
if (strTarayici_Bilgileri.indexOf("VFD 1100") > -1)
strCihaz_Bilgisi = "Vodafone Smart Tab Mini 7";
if (strTarayici_Bilgileri.indexOf("Vodafone Smart ultra 6") > -1)
strCihaz_Bilgisi = "Vodafone Smart 6";

if (strTarayici_Bilgileri.indexOf("XS Build") > -1)
strCihaz_Bilgisi = "Vonino Onyx XS";

if (strTarayici_Bilgileri.indexOf("Redmi 4") > -1)
strCihaz_Bilgisi = "Xiaomi Redmi 4";
if (strTarayici_Bilgileri.indexOf("Redmi 4A") > -1)
strCihaz_Bilgisi = "Xiaomi Redmi 4a";
if (strTarayici_Bilgileri.indexOf("Redmi Note 4") > -1)
strCihaz_Bilgisi = "Xiaomi Redmi Note 4";
if (strTarayici_Bilgileri.indexOf("Redmi 5A") > -1)
strCihaz_Bilgisi = "Xiaomi Redmi 5A";
if (strTarayici_Bilgileri.indexOf("Redmi 5 Plus") > -1)
strCihaz_Bilgisi = "Xiaomi Redmi 5 Plus";
if (strTarayici_Bilgileri.indexOf("Redmi Note 6 Pro") > -1)
strCihaz_Bilgisi = "Xiaomi Redmi Note 6 Pro";
if (strTarayici_Bilgileri.indexOf("Redmi Note 8") > -1)
strCihaz_Bilgisi = "Xiaomi Redmi Note 8";
if (strTarayici_Bilgileri.indexOf("Mi A2") > -1)
strCihaz_Bilgisi = "Xiaomi Mi A2";


/* Bot (BAŞLANGIÇ) */
if (strTarayici_Bilgileri.indexOf("ia_archiver") > -1 || strTarayici_Bilgileri.indexOf("alexa") > -1)
strIsletim_Sistemi = "Alexa Bot";
if (strTarayici_Bilgileri.indexOf("AhrefsBot") > -1)
strIsletim_Sistemi = "Ahrefs Bot";
if (strTarayici_Bilgileri.indexOf("AcoonBot") > -1)
strIsletim_Sistemi = "Acoon Bot";
if (strTarayici_Bilgileri.indexOf("archive.org") > -1)
strIsletim_Sistemi = "Archive.org Bot";
if (strTarayici_Bilgileri.indexOf("Baiduspider") > -1)
strIsletim_Sistemi = "Baidu Bot";
if (strTarayici_Bilgileri.indexOf("bingbot") > -1 || strTarayici_Bilgileri.indexOf("msnbot") > -1)
strIsletim_Sistemi = "Bing Bot";
if (strTarayici_Bilgileri.indexOf("Cliqzbot") > -1)
strIsletim_Sistemi = "Cliqz Bot";
if (strTarayici_Bilgileri.indexOf("comscore") > -1)
strIsletim_Sistemi = "Comscore Web Crawler";
if (strTarayici_Bilgileri.indexOf("DeuSu") > -1 && strTarayici_Bilgileri.indexOf("robot") > -1)
strIsletim_Sistemi = "DeuSu Bot";
if (strTarayici_Bilgileri.indexOf("DoCoMo") > -1)
strIsletim_Sistemi = "DoCoMo Bot";
if (strTarayici_Bilgileri.indexOf("DotBot") > -1)
strIsletim_Sistemi = "Dot Bot";
if (strTarayici_Bilgileri.indexOf("DomainStatsBot") > -1)
strIsletim_Sistemi = "Domain Stats Bot";
if (strTarayici_Bilgileri.indexOf("DomainCrawler") > -1)
strIsletim_Sistemi = "Domain Crawler";
if (strTarayici_Bilgileri.indexOf("Exabot") > -1)
strIsletim_Sistemi = "Exa Bot";
if (strTarayici_Bilgileri.indexOf("facebookexternalhit") > -1)
strIsletim_Sistemi = "Facebook Bot";
if (strTarayici_Bilgileri.indexOf("Googlebot") > -1)
strIsletim_Sistemi = "Google Bot";
if (strTarayici_Bilgileri.indexOf("Google-AMPHTML") > -1)
strIsletim_Sistemi = "Google-AMPHTML Bot";
if (strTarayici_Bilgileri.indexOf("GrapeshotCrawler") > -1)
strIsletim_Sistemi = "Grapeshot Crawler";
if (strTarayici_Bilgileri.indexOf("LivelapBot") > -1)
strIsletim_Sistemi = "Livelap Bot";
if (strTarayici_Bilgileri.indexOf("LinkpadBot") > -1)
strIsletim_Sistemi = "Linkpad Bot";
if (strTarayici_Bilgileri.indexOf("Mediatoolkitbot") > -1)
strIsletim_Sistemi = "Mediatoolkit Bot";
if (strTarayici_Bilgileri.indexOf("MegaIndex") > -1)
strIsletim_Sistemi = "Mega Index Bot";
if (strTarayici_Bilgileri.indexOf("MJ12bot") > -1)
strIsletim_Sistemi = "MJ12 Bot";
if (strTarayici_Bilgileri.indexOf("Mail.RU") > -1)
strIsletim_Sistemi = "Mail.RU Bot";
if (strTarayici_Bilgileri.indexOf("MetaURI API") > -1)
strIsletim_Sistemi = "MetaURI API Bot";
if (strTarayici_Bilgileri.indexOf("NetcraftSurveyAgent") > -1)
strIsletim_Sistemi = "Netcraft Survey Agent";
if (strTarayici_Bilgileri.indexOf("PaperLiBot") > -1)
strIsletim_Sistemi = "PaperLi Bot";
if (strTarayici_Bilgileri.indexOf("SiteExplorer") > -1)
strIsletim_Sistemi = "Site Explorer Bot";
if (strTarayici_Bilgileri.indexOf("SeznamBot") > -1)
strIsletim_Sistemi = "Seznam Bot";
if (strTarayici_Bilgileri.indexOf("SemrushBot") > -1)
strIsletim_Sistemi = "Semrush Bot";
if (strTarayici_Bilgileri.indexOf("Sogou") > -1)
strIsletim_Sistemi = "Sogou Bot";
if (strTarayici_Bilgileri.indexOf("socialrank") > -1)
strIsletim_Sistemi = "Social Rank IO Bot";
if (strTarayici_Bilgileri.indexOf("spbot") > -1)
strIsletim_Sistemi = "Sp Bot";
if (strTarayici_Bilgileri.indexOf("SurdotlyBot") > -1)
strIsletim_Sistemi = "Surdotly Bot";
if (strTarayici_Bilgileri.indexOf("Twitterbot") > -1)
strIsletim_Sistemi = "Twitter Bot";
if (strTarayici_Bilgileri.indexOf("Uptimebot") > -1)
strIsletim_Sistemi = "Uptime Bot";
if (strTarayici_Bilgileri.indexOf("YandexBot") > -1 || strTarayici_Bilgileri.indexOf("YandexAccessibilityBot") > -1)
strIsletim_Sistemi = "Yandex Bot";
if (strTarayici_Bilgileri.indexOf("YandexMetrika") > -1)
strIsletim_Sistemi = "Yandex Metrika Bot";
if (strTarayici_Bilgileri.indexOf("Yahoo!") > -1)
strIsletim_Sistemi = "Yahoo! Bot";
/* Bot (BİTİŞ) */

/* BlackBerry (BAŞLANGIÇ) */
if (strTarayici_Bilgileri.indexOf("BB10") > -1 || strTarayici_Bilgileri.indexOf("BB10; Touch") > -1)
strIsletim_Sistemi = "BlackBerry 10";
if (strTarayici_Bilgileri.indexOf("BlackBerry") > -1)
strIsletim_Sistemi = "BlackBerry";
if (strTarayici_Bilgileri.indexOf("RIM Tablet OS") > -1)
strIsletim_Sistemi = "BlackBerry 2";
/* BlackBerry (BİTİŞ) */

/* Apple (BAŞLANGIÇ) */
if (strTarayici_Bilgileri.indexOf("Mac OS X") > -1)
strIsletim_Sistemi = "Mac OS X";
if (strTarayici_Bilgileri.indexOf("Mac OS X 10_10") > -1)
strIsletim_Sistemi = "Mac OS Yosemite";
if (strTarayici_Bilgileri.indexOf("Mac OS X 10_11") > -1)
strIsletim_Sistemi = "Mac OS El Capitan";
if (strTarayici_Bilgileri.indexOf("Mac OS X 10_5") > -1)
strIsletim_Sistemi = "Mac OS Leopard";
if (strTarayici_Bilgileri.indexOf("Mac OS X 10_6") > -1)
strIsletim_Sistemi = "Mac OS Snow Leopard";
if (strTarayici_Bilgileri.indexOf("Mac OS X 10_7") > -1 || strTarayici_Bilgileri.indexOf("Mac OS X 10.7") > -1)
strIsletim_Sistemi = "Mac OS Lion";
if (strTarayici_Bilgileri.indexOf("Mac OS X 10_9") > -1)
strIsletim_Sistemi = "Mac OS Mavericks";
if (strTarayici_Bilgileri.indexOf("iPhone OS") > -1)
strIsletim_Sistemi = "iOS";
/* Apple (BİTİŞ) */

if (strTarayici_Bilgileri.indexOf("SymbOS") > -1)
strIsletim_Sistemi = "Symbian";

/* Linux (BAŞLANGIÇ) */
if (strTarayici_Bilgileri.indexOf("Linux") > -1)
strIsletim_Sistemi = "Linux";
/* Linux (BİTİŞ) */

/* Android (BAŞLANGIÇ) */
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 1.0") > -1)
strIsletim_Sistemi = "Android 1.0";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 1.1") > -1)
strIsletim_Sistemi = "Android Petit Four";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 1.5") > -1)
strIsletim_Sistemi = "Android 1.5 Cupcake";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 1.6") > -1)
strIsletim_Sistemi = "Android 1.6 Donut";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.0") > -1)
strIsletim_Sistemi = "Android 2.0 Eclair";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.0.1") > -1)
strIsletim_Sistemi = "Android 2.0.1 Eclair";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.1") > -1)
strIsletim_Sistemi = "Android 2.1 Eclair";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.2") > -1)
strIsletim_Sistemi = "Android 2.2 Froyo";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.2.1") > -1)
strIsletim_Sistemi = "Android 2.2.1 Froyo";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.2.2") > -1)
strIsletim_Sistemi = "Android 2.2.2 Froyo";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.2.3") > -1)
strIsletim_Sistemi = "Android 2.2.3 Froyo";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.3") > -1)
strIsletim_Sistemi = "Android 2.3 Gingerbread";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.3.1") > -1)
strIsletim_Sistemi = "Android 2.3.1 Gingerbread";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.3.2") > -1)
strIsletim_Sistemi = "Android 2.3.2 Gingerbread";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.3.3") > -1)
strIsletim_Sistemi = "Android 2.3.3 Gingerbread";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.3.4") > -1)
strIsletim_Sistemi = "Android 2.3.4 Gingerbread";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.3.5") > -1)
strIsletim_Sistemi = "Android 2.3.5 Gingerbread";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.3.6") > -1)
strIsletim_Sistemi = "Android 2.3.6 Gingerbread";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 2.3.7") > -1)
strIsletim_Sistemi = "Android 2.3.7 Gingerbread";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 3.0") > -1)
strIsletim_Sistemi = "Android 3.0 Honeycomb";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 3.1") > -1)
strIsletim_Sistemi = "Android 3.1 Honeycomb";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 3.2") > -1)
strIsletim_Sistemi = "Android 3.2 Honeycomb";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 3.2.1") > -1)
strIsletim_Sistemi = "Android 3.2.1 Honeycomb";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 3.2.2") > -1)
strIsletim_Sistemi = "Android 3.2.2 Honeycomb";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 3.2.3") > -1)
strIsletim_Sistemi = "Android 3.2.3 Honeycomb";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 3.2.4") > -1)
strIsletim_Sistemi = "Android 3.2.4 Honeycomb";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 3.2.5") > -1)
strIsletim_Sistemi = "Android 3.2.5 Honeycomb";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 3.2.6") > -1)
strIsletim_Sistemi = "Android 3.2.6 Honeycomb";
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.0") > -1)
strIsletim_Sistemi = "Android 4.0 Ice Cream Sandwich";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.0.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 15") > -1)
strIsletim_Sistemi = "Android 4.0.1 Ice Cream Sandwich";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.0.2") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 15") > -1)
strIsletim_Sistemi = "Android 4.0.2 Ice Cream Sandwich";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.0.3") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 15") > -1)
strIsletim_Sistemi = "Android 4.0.3 Ice Cream Sandwich";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.0.4") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 15") > -1)
strIsletim_Sistemi = "Android 4.0.4 Ice Cream Sandwich";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 16") > -1)
strIsletim_Sistemi = "Android 4.1 Jelly Bean";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.1.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 16") > -1)
strIsletim_Sistemi = "Android 4.1.1 Jelly Bean";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.1.2") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 16") > -1)
strIsletim_Sistemi = "Android 4.1.2 Jelly Bean";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.2") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 17") > -1)
strIsletim_Sistemi = "Android 4.2 Jelly Bean";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.2.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 17") > -1)
strIsletim_Sistemi = "Android 4.2.1 Jelly Bean";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.2.2") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 17") > -1)
strIsletim_Sistemi = "Android 4.2.2 Jelly Bean";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.3") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 18") > -1)
strIsletim_Sistemi = "Android 4.3 Jelly Bean";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.3.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 18") > -1)
strIsletim_Sistemi = "Android 4.3.1 Jelly Bean";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.4") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 19") > -1)
strIsletim_Sistemi = "Android 4.4 KitKat";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.4.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 19") > -1)
strIsletim_Sistemi = "Android 4.4.1 KitKat";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.4.2") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 19") > -1)
strIsletim_Sistemi = "Android 4.4.2 KitKat";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.4.3") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 19") > -1)
strIsletim_Sistemi = "Android 4.4.3 KitKat";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.4.4") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 19") > -1)
strIsletim_Sistemi = "Android 4.4.4 KitKat";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.4W") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 19") > -1)
strIsletim_Sistemi = "Android 4.4W KitKat";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.4W.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 19") > -1)
strIsletim_Sistemi = "Android 4.4W.1 KitKat";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 4.4W.2") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 19") > -1)
strIsletim_Sistemi = "Android 4.4W.2 KitKat";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 5.0") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 21") > -1)
strIsletim_Sistemi = "Android 5.0 Lollipop";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 5.0.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 22") > -1)
strIsletim_Sistemi = "Android 5.0.1 Lollipop";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 5.0.2") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 22") > -1)
strIsletim_Sistemi = "Android 5.0.2 Lollipop";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 5.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 22") > -1)
strIsletim_Sistemi = "Android 5.1 Lollipop";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 5.1.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 22") > -1)
strIsletim_Sistemi = "Android 5.1.1 Lollipop";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 6.0") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 23") > -1)
strIsletim_Sistemi = "Android 6.0 Marshmallow";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 6.0.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 23") > -1)
strIsletim_Sistemi = "Android 6.0.1 Marshmallow";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 7.0") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 24") > -1)
strIsletim_Sistemi = "Android 7.0 Nougat";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 7.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 25") > -1)
strIsletim_Sistemi = "Android 7.1 Nougat";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 7.1.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 25") > -1)
strIsletim_Sistemi = "Android 7.1.1 Nougat";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 7.1.2") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 25") > -1)
strIsletim_Sistemi = "Android 7.1.2 Nougat";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 8.0") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 26") > -1)
strIsletim_Sistemi = "Android 8.0 Oreo";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 8.1") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 27") > -1)
strIsletim_Sistemi = "Android 8.1 Oreo";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 9.0") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 28") > -1)
strIsletim_Sistemi = "Android 9.0 Pie";
if ((strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("Android 10") > -1) || strTarayici_Bilgileri.indexOf("VERSION.SDK.NUMBER: 29") > -1)
strIsletim_Sistemi = "Android 10 Q";
/* Android (BİTİŞ) */

/* Microsoft (BAŞLANGIÇ) */
if (strTarayici_Bilgileri.indexOf("Windows CE") > -1)
strIsletim_Sistemi = "Windows CE";
if (strTarayici_Bilgileri.indexOf("Windows 95") > -1 || strTarayici_Bilgileri.indexOf("Win95") > -1)
strIsletim_Sistemi = "Windows 95";
if (strTarayici_Bilgileri.indexOf("Windows 98") > -1 || strTarayici_Bilgileri.indexOf("Win98") > -1)
strIsletim_Sistemi = "Windows 98";
if (strTarayici_Bilgileri.indexOf("Windows NT 5") > -1)
strIsletim_Sistemi = "Windows 2000";
if (strTarayici_Bilgileri.indexOf("Windows ME") > -1 || strTarayici_Bilgileri.indexOf("Win 9x 4.90") > -1)
strIsletim_Sistemi = "Windows ME";
if (strTarayici_Bilgileri.indexOf("Windows NT 5.1") > -1)
strIsletim_Sistemi = "Windows XP";
if (strTarayici_Bilgileri.indexOf("Windows NT 5.2") > -1)
strIsletim_Sistemi = "Windows Server 2003";
if (strTarayici_Bilgileri.indexOf("Windows NT 6.0") > -1)
strIsletim_Sistemi = "Windows Vista";
if (strTarayici_Bilgileri.indexOf("Windows NT 6.1") > -1)
strIsletim_Sistemi = "Windows 7";
if (strTarayici_Bilgileri.indexOf("Windows NT 6.2") > -1)
strIsletim_Sistemi = "Windows 8";
if (strTarayici_Bilgileri.indexOf("Windows NT 6.3") > -1)
strIsletim_Sistemi = "Windows 8.1";
if (strTarayici_Bilgileri.indexOf("Windows NT 10.0") > -1)
strIsletim_Sistemi = "Windows 10";
if (strTarayici_Bilgileri.indexOf("Windows Phone 8.0") > -1)
strIsletim_Sistemi = "Windows Phone 8.0";
if (strTarayici_Bilgileri.indexOf("Windows Phone 8.1") > -1)
strIsletim_Sistemi = "Windows Phone 8.1";
/* Microsoft (BİTİŞ) */

/* Smart TV (BAŞLANGIÇ) */
if (strTarayici_Bilgileri.indexOf("Linux") > -1 && strTarayici_Bilgileri.indexOf("SMART-TV") > -1)
strIsletim_Sistemi = "SMART-TV";
/* Smart TV (BİTİŞ) */

arrSonuc.push(strCihaz_Bilgisi, strReferans, strIsletim_Sistemi);

return arrSonuc;
}


Şimdi ise bu fonksiyonumuzdaki değerleri okuyalım.
Fonksiyondaki Bilgiler

var strBilgiler = fnZiyaretci_Bilgileri();
alert("Cihaz Bilgisi: " + strBilgiler[0] + "
Referans: " + strBilgiler[1] + "
İşletim Sistemi: " + strBilgiler[2]);


Örnek:



Kaynak: https://www.ontedi.com/javascript/javascript-ile-ziyaretci-bilgilerini-detayli-ogrenelim
Okanisik

kişi bu mesajı beğendi.

www.ontedi.com
www.cizgi.site
wmaraci
reklam

Okanisik Okanisik Vip Tema Web Tasarım A.Ş. Kullanıcı
  • Üyelik 29.06.2011
  • Yaş/Cinsiyet 37 / E
  • Meslek Vip Tema Web Tasarım A.Ş.
  • Konum Tekirdağ
  • Ad Soyad Ö** I**
  • Mesajlar 1380
  • Beğeniler 699 / 702
  • Ticaret 21, (%100)
javascript ile almak çok güzel ama yeni bir tarayıcı, yeni bir telefon markası, yeni bir isletim sistemi çıktığında kod guncellenmeli sürekli. Php ile en azından bu verilerin bir kısmını otomatik tesbit edebiliyoruz.
 

 

Vip Tema Web Tasarım A.Ş.

Decimas Decimas WM Aracı Kullanıcı
  • Üyelik 19.04.2015
  • Yaş/Cinsiyet 26 / E
  • Meslek Developer
  • Konum İstanbul Avrupa
  • Ad Soyad E** E**
  • Mesajlar 821
  • Beğeniler 1 / 302
  • Ticaret 1, (%100)
Ayrıca bu kadar if else bildiğin spagetti, regex gibi daha dinamik ve sistemi yormayacak bir yaklaşım benimsenebilir.
yetkilibiri

kişi bu mesajı beğendi.

no time for caution

yetkilibiri yetkilibiri Yazılım Uzmanı Kullanıcı
  • Üyelik 28.05.2017
  • Yaş/Cinsiyet 38 / E
  • Meslek Yazılım Uzmanı
  • Konum İstanbul Avrupa
  • Ad Soyad E** Y**
  • Mesajlar 107
  • Beğeniler 41 / 41
  • Ticaret 2, (%100)
Decimas a katılıyorum. regex ile kısaltılabilir. Bir de ekleme yapmak istiyorum bu kadar if bloğunda else kullanılmazsa tek tek bütün şartları kontrol eder.

Yani ilk şart sağlanıyorsa ilk if bloğunda cihaz adı bulunmuş olsa dahi alttaki şartları tekrar kontrol etmeye gereksiz devam edecektir. else kullanmak bu gereksizliği ortadan kaldırır.

Paylaşımlarınızın devam etmesi dileğiyle iyi forumlar..
 

 

wmaraci
Mersin evden eve nakliyat

ontedi ontedi www.ontedi.com Kullanıcı
  • Üyelik 03.10.2013
  • Yaş/Cinsiyet 44 / E
  • Meslek Yazılım Uzmanı, Matematikçi
  • Konum Ankara
  • Ad Soyad S** T**
  • Mesajlar 1119
  • Beğeniler 325 / 324
  • Ticaret 2, (%100)
Arkadaşlar, "düzen" ve "okunabilirlik" gibi konularda haklısınız. Zamanında kütüphaneye böyle ekleye ekleye yapmıştım. Açıkcası daha düzenli hale getirmek için üşendim. Zaten json, veritabanı gibi daha pratik çözümlerle yapılabilirdi.

Vaktim olsa yapıcam daha güzel bir şekilde yapıcam ama vakit yok.
 

 

www.ontedi.com
www.cizgi.site

muratsalweb muratsalweb WM Aracı Kullanıcı
  • Üyelik 06.04.2016
  • Yaş/Cinsiyet 38 / E
  • Meslek Bilgisayar Mühendisi
  • Konum İstanbul Anadolu
  • Ad Soyad M** Ç**
  • Mesajlar 42
  • Beğeniler 1 / 11
  • Ticaret 0, (%0)

var deviceData= [
{deviceName:'Alcatel OneTouch Pixi 4' ,searchText:['8063']},
{deviceName:'Asus Zenfone 5 Lite' ,searchText:['ASUS_T00K']},
{deviceName:'Asus Memo Pad HD 7' ,searchText:['K00U']},
{deviceName:'Asus Zenpad 8.0' ,searchText:['P00A']},
{deviceName:'Asus Zenfone Live' ,searchText:['ASUS_Z00LD']},
{deviceName:'Lenovo Tab 3' ,searchText:['Lenovo TB3-710F','Lenovo TB3-850F']},
{deviceName:'Asus Zenfone Live' ,searchText:['ASUS_A007']},
{deviceName:'Asus ZenFone 3' ,searchText:['ASUS_Z012S']}
];

function getDeviceInfo(userAgent)
{
var deviceFind = deviceData.find(function(deviceItem){
return !!deviceItem.searchText.find(x=> userAgent.indexOf(x)>-1);
});

return !deviceFind ? "" : deviceFind.deviceName;
}



Şu şekilde bir yapıya dönüştürülebilir. Datayı da serverdan json olarak çekersen tadından yenmez.
 

 

Decimas Decimas WM Aracı Kullanıcı
  • Üyelik 19.04.2015
  • Yaş/Cinsiyet 26 / E
  • Meslek Developer
  • Konum İstanbul Avrupa
  • Ad Soyad E** E**
  • Mesajlar 821
  • Beğeniler 1 / 302
  • Ticaret 1, (%100)

yetkilibiri adlı üyeden alıntı

Decimas a katılıyorum. regex ile kısaltılabilir. Bir de ekleme yapmak istiyorum bu kadar if bloğunda else kullanılmazsa tek tek bütün şartları kontrol eder.

Yani ilk şart sağlanıyorsa ilk if bloğunda cihaz adı bulunmuş olsa dahi alttaki şartları tekrar kontrol etmeye gereksiz devam edecektir. else kullanmak bu gereksizliği ortadan kaldırır.

Paylaşımlarınızın devam etmesi dileğiyle iyi forumlar..


Ben aslında if else'in çalışma mantığına değil n tane durum için n tane if else kullanılmasına takılmıştım. Örneğin 10 bin farklı durum varsa ve hepsi için if else kullanacağım demek. Bu yaklaşımın sağlıklı olmadığını düşünüyorum. Böyle kodlar görünce kafam sürekli SOLID'e gidiyor.
 

 

no time for caution
wmaraci
Konuyu toplam 1 kişi okuyor. (0 kullanıcı ve 1 misafir)
Site Ayarları
  • Tema Seçeneği
  • Site Sesleri
  • Bildirimler
  • Özel Mesaj Al