Registrieren
x

Log in

Benutzername:

Passwort:
 

oder Registrieren

  Passwort vergessen?



Antwort schreiben 
 
Themabewertung:
  • 0 Bewertungen - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Mobile Geräte erkennen mittels JavaScript
01-09-2010, 05:23 PM
Beitrag #1
Mobile Geräte erkennen mittels JavaScript
Code:
///////////////////////////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////////////////////////

// AB HIER KANN ALLES GEÄNDERT WERDEN //

///////////////////////////////////////////////////////////////////////////////////////
// Finden wir Iphone oder Ipod im User-Agent
///////////////////////////////////////////////////////////////////////////////////////
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
    if (document.cookie.indexOf("iphone_redirect=false") == -1) {
        window.location = "Your Link";
    }
}
///////////////////////////////////////////////////////////////////////////////////////
// Finden wir Ipad im User-Agent
///////////////////////////////////////////////////////////////////////////////////////
if((navigator.userAgent.match(/iPad/i))) {
    if (document.cookie.indexOf("iphone_redirect=false") == -1) {
        window.location = "Your Link";
    }
}
///////////////////////////////////////////////////////////////////////////////////////
// Finden wir Android im User-Agent
///////////////////////////////////////////////////////////////////////////////////////
if((navigator.userAgent.match(/android/i))) {
    if (document.cookie.indexOf("android_redirect=false") == -1) {
        window.location = "Your Link";
    }
}
///////////////////////////////////////////////////////////////////////////////////////
// Finden wir Opera Mini im User-Agent
///////////////////////////////////////////////////////////////////////////////////////
if((navigator.userAgent.match(/opera mini/i))) {
    if (document.cookie.indexOf("opera_redirect=false") == -1) {
        window.location = "Your Link";
    }
}
///////////////////////////////////////////////////////////////////////////////////////
// Finden wir Blackberry im User-Agent
///////////////////////////////////////////////////////////////////////////////////////
if((navigator.userAgent.match(/blackberry/i))) {
    if (document.cookie.indexOf("blackberry_redirect=false") == -1) {
        window.location = "Your Link";
    }
}
///////////////////////////////////////////////////////////////////////////////////////
// Finden wir Palm Os im User-Agent
///////////////////////////////////////////////////////////////////////////////////////
if((navigator.userAgent.match(/(pre/|palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine)/i))) {
    if (document.cookie.indexOf("palmos_redirect=false") == -1) {
        window.location = "Your Link";
    }
}
///////////////////////////////////////////////////////////////////////////////////////
// Finden wir Windows Mobile im User-Agent
///////////////////////////////////////////////////////////////////////////////////////
if((navigator.userAgent.match(/(iris|3g_t|windows ce|opera mobi|windows ce; smartphone;|windows ce; iemobile)/i))) {
    if (document.cookie.indexOf("windowsmobile_redirect=false") == -1) {
        window.location = "Your Link";
    }
}
///////////////////////////////////////////////////////////////////////////////////////
// Finden wir Mobile Geräte im User-Agent
///////////////////////////////////////////////////////////////////////////////////////
if((navigator.userAgent.match(/(Opera Mobile|mini 9.5|vx1000|lge |m800|e860|u940|ux840|compal|wireless| mobi|ahong|lg380|lgku|lgu900|lg210|lg47|lg920|lg840|lg370|sam-r|mg50|s55|g83|t66|vx400|mk99|d615|d763|el370|sl900|mp500|samu3|samu4|vx10|xda_|​samu5|samu6|samu7|samu9|a615|b832|m881|s920|n210|s700|c-810|_h797|mob-x|sk16d|848b|mowser|s580|r800|471x|v120|rim8|c500foma:|160x|x160|480x|x640|t503|​w839|i250|sprint|w398samr810|m5252|c7100|mt126|x225|s5330|s820|htil-g1|fly v71|s302|-x113|novarra|k610i|-three|8325rc|8352rc|sanyo|vx54|c888|nx250|n120|mtk |c5588|s710|t880|c5005|i;458x|p404i|s210|c5100|teleca|s940|c500|s590|foma|samsu|​vx8|vx9|a1000|_mms|myx|a700|gu1100|bc831|e300|ems100|me701|me702m-three|sd588|s800|8325rc|ac831|mw200|brew |d88|htc/|htc_touch|355x|m50|km100|d736|p-9521|telco|sl74|ktouch|m4u/|me702|8325rc|kddi|phone|lg |sonyericsson|samsung|240x|x320|vx10|nokia|sony cmd|motorola|up.browser|up.link|mmp|symbian|smartphone|midp|wap|vodafone|o2|pock​et|kindle|mobile|psp|treo)/i))) {
    if (document.cookie.indexOf("mobile_redirect=false") == -1) {
        window.location = "Your Link";
    }
}
///////////////////////////////////////////////////////////////////////////////////////
//

jeweils bei
Zitat:window.location = "Your Link";
die Url einsetzen, wo die angepasste Webseite zu finden ist für den User

Paxi, fixi, knaxi, lexi, knoxi, schmexi, schixi drauf.
Paxi, fixi, reib sie, knall sie, nimm sie, wirf sie, zieh sie aus.
Paxi, fixi, roxi, treib sie, saug sie, lutsch sie, schixi drauf.
Paxi, fixi, stoß sie, pop sie, reib sie, pimp sie, schmeiß? sie raus.
Paxi fixi! Paxi fixi!
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren
01-09-2010, 07:21 PM
Beitrag #2
Re: Mobile Geräte erkennen mittels JavaScript
Weißt du auch wie meine eine PSP oder PS3 erkennt?
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren
Antwort schreiben 


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste

Kontakt   Anti-Hack - Gemeinsam gegen DDoS, Spam und Hacker   Nach oben   Zum Inhalt   Archiv-Modus   RSS-Synchronisation   Impressum