I am trying to make a w web for a QR code in which detecting the navigator browser, leads you to the app store (android, ios, BB...)
I had this code from a previous project but it doesn't work for android, so it does for ios and BB
//Detect special conditions devices
$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");
$iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad");
if(stripos($_SERVER['HTTP_USER_AGENT'],"Android") && stripos($_SERVER['HTTP_USER_AGENT'],"mobile")){
$Android = true;
}else if(stripos($_SERVER['HTTP_USER_AGENT'],"Android")){
$Android = false;
$AndroidTablet = true;
}else{
$Android = false;
$AndroidTablet = false;
}
$webOS = stripos($_SERVER['HTTP_USER_AGENT'],"webOS");
$BlackBerry = stripos($_SERVER['HTTP_USER_AGENT'],"BlackBerry");
$RimTablet= stripos($_SERVER['HTTP_USER_AGENT'],"RIM Tablet");
What do I have to do to fix it? Also, in a near future I will have to add windows phone. What should i check also? "explorer"?