Identify computer or mobile phone access to website php code
0? $ Matches [0]: ''; function CheckSubstrs ($ substrs, $ text) {foreach ($ substrs as $ substr) if (false! = Strpos ($ text, $ substr) {return true;} return false;} $ mobile_ OS _list = array ('Google Wireless transcoder', 'windows CE ', 'windowsce ', 'symbian ', 'Android', 'armv6l', 'armv5', 'mobile', 'cento', 'mogin', 'avantgo ', 'Opera mobi ', 'j2'/MIDP ', 'Smartphone', 'Go. web ', 'Palm', 'ipaq '); $ mobile_token_list = array ('Profile/MIDP', 'configuration/CLDC-', '2017 × 160 ', '000000', '000000', '000000', '000000', '000000', 'up. browser ', 'Up. link ', 'Symbian OS', 'palmos ', 'pocketpc', 'sonyericsson', 'Nokia ', 'BlackBerry', 'Vodafone', 'benq', 'novarra-Vision ', 'Iris', 'netfront', 'HTC _ ', 'xda _', 'Samsung-sgh', 'wapaka ', 'docomo', 'iPhone ', 'iPod '); $ found_mobile = CheckSubstrs ($ mobile_ OS _list, $ useragent_commentsblock) | CheckSubstrs ($ mobile_token_list, $ useragent); if ($ found_mobile) {return true ;} else {return false ;}} if (isMobile () echo 'log on to www.cuangs.com '; Elseecho 'log on to www.ydutv.com';?>