URL Umleitung für Apple iPad, iPod, iPhone, Android, Opera Mini, Blackberry, Palm und Windows Smartphone. Mit dieser PHP-Funktion von Andy Moore könnt Ihr Eure mobilen Besucher auf eurer Mobiltelefon optimierte Webseite umleiten.
1 2 3 4 | $redirect = "https://diedesigner.net/mobil/"; require_once('mobile_device_detect.php'); mobile_device_detect(true,true,true,true,true,true,true,$redirect,true); |
Download Mobile Device Detect PHP Script
Neuen Parameter können bei dieser PHP-Funktion gesetzt werden:
- iPhone – Set to true to treat iPhones as mobiles, false to treat them like full browsers or set a URL (including http://) to redirect iPhones and iPods to.
- iPad – Set to true to treat iPads as mobiles, false to treat them like full browsers or set a URL (including http://) to redirect iPads to.
- Android – Set to true to treat Android handsets as mobiles, false to treat them like full browsers or set a URL (including http://) to redirect Android and Google mobile users to.
- Opera Mini – Set to true to treat Opera Mini like a mobile, false to treat it like full browser or set a URL (including http://) to redirect Opera Mini users to.
- Blackberry – Set to true to treat Blackberry like a mobile, false to treat it like full browser or set a URL (including http://) to redirect Blackberry users to.
- Palm – Set to true to treat Palm OS like a mobile, false to treat it like full browser or set a URL (including http://) to redirect Palm OS users to.
- Windows – Set to true to treat Windows Mobiles like a mobile, false to treat it like full browser or set a URL (including http://) to redirect Windows Mobile users to.
- Mobile Redirect URL – This should be full web address (including http://) of the site (or page) you want to send mobile visitors to. Leaving this blank will make the script return true when it detects a mobile.
- Desktop Redirect URL – This should be full web address (including http://) of the site (or page) you want to send non-mobile visitors to. Leaving this blank will make the script return false when it fails to detect a mobile.
android, Apple iPad, blackberry, Codeschnipsel, codesnip, codesnippets, iPhone, ipod, Opera Mini, Palm, PHP, redirect, umleitung, Windows Smartphone
4 haben zu diesem Beitrag ein Kommentar hinterlassen
Berna Matsuo
16. Oktober 2011 at 04:26
Awesome story over again! Thanks:)
Hayden Aportunse
28. Dezember 2011 at 00:50
Google Android, Apple iPhone, and now Windows sell a service whereby their market can express themselves with that service and product.
Nexyedgerne
26. Januar 2012 at 21:22
Hello! Just want to say thank you for this interesting article! =) Peace, Joy.
GamreoraMeand
31. Januar 2012 at 17:08
Hio best wishes to you and your very nice blog,