Time of Update: 2015-09-01
Constant-Constant class Public classConstant {//Browser Type Public Static FinalString[] mobileagents = {"iphone", "Android", "Phone", "mobile", "WAP", "NetFront", "Java", "Opera Mobi", "Opera Mini", "UCWeb", "Windows CE", "Symbian", "series", "webOS", "Sony", "BlackBerry", "Dopod", "Nokia", "Samsung", "PalmSource", "XDA", "Pieplus", "Meizu", "MIDP", "CLDC", "Motorola", "Foma", "DoCoMo", "Up.browser", "Up.link", "Blazer", "Helio", "Hosin", "Huawei", "Novarra"
Time of Update: 2015-06-30
//Determine whether it is a mobile phone protectedfunctionismobile () { $user _agent=$_server[' http_user_agent ']; $mobile _agents=array ("240x320", "Acer", "Acoon", "acs-", " Abacho "," Ahong "," Airness "," Alcatel "," Amoi "," Android "," anywhereyougo.com ", "applewebkit/525", "applewebkit/532", "asus", "audio", "au-mic", "Avantogo", "Becker", "BenQ", "Bilbo", "Bird", "BlackBerry", "blazer", "bleu", " cdm-"," Compal "," Coolpad "," Danger "," Dbtel "," Dopod "," Elaine "," Eric ", "Eto
Time of Update: 2015-05-20
', ' cmd-', ' Dang ', ' doco ', ' Eric ', ' Hipt ', ' Inno ', ' iPAQ ', ' Java ', ' Jigs ', ' kddi ', ' Keji ', ' Leno ', ' lg-c ' ', ' lg-d ', ' lg-g ', ' lge-', ' Maui ', ' Maxo ', ' MIDP ', ' mits ', ' mmEF ', ' mobi ', ' mot-', ' moto ', ' mwbp ', ' nec-', ' Newt ', ' Noki ', ' oper ', ' palm ', ' pana ', ' Pant ', ' Phil ', ' play ', ' Port ', ' ProX ', ' Qwap ', ' sage ', ' Sams ', ' Sany ', ' sch-', ' sec-', ' send ', ' Seri ', ' sgh-', ' shar
Time of Update: 2015-07-14
Many times can also be judged by logic programs, such as PHP, JS is commonly used to identify the two common methods of accessing device types.The principle is to identify the access client http_user_agent, and then perform keyword matching to determine the device type, for the forgery of the HTTP header can not be distinguished.Differentiate device type then you have to be able to display easy-to-read Web pages for different settings, specifically to study responsive layout techniques.This arti
Time of Update: 2014-01-20
Copy codeThe Code is as follows:Function isMobile (){$ Useragent = isset ($ _ SERVER ['HTTP _ USER_AGENT '])? $ _ SERVER ['HTTP _ USER_AGENT ']: '';$ Useragent_commentsblock = preg_match ('| \(.*? \) | ', $ Useragent, $ matches)> 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'
Time of Update: 2014-05-11
', 'ipaq ');$ Mobile_token_list = array ('profile/MIDP ', 'configuration/CLDC-', '000000', '000000', '000000', '000000 ', '1970*240 ', '1970*320', '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, $ browser) |Chec
Time of Update: 2014-07-06
= strtolower (substr ($ _ SERVER ['HTTP _ USER_AGENT '], 0, 4 ));$ Mobile_agents = array ('W3c ', 'acs-', 'alav', 'alca', 'amodi', 'audi', 'avany', 'benq', 'bird ', 'blac ','Blaz', 'brew', 'cell ', 'cldc', 'cmd-', 'dang', 'Doc', 'Eric ', 'hipt ', 'inno ','Ipaq ', 'java', 'glasis', 'dkdi', 'keji', 'leno', 'lg-C', 'lg-d ', 'lg-G', 'lge -','Maui', 'maxo', 'midp ', 'mits', 'mmef', 'mobi', 'mot-', 'moto', 'mwbp ', 'nec -','Newt ', 'noki', 'login', 'palm',
Time of Update: 2015-12-02
Determine if a mobile device is logged onpublic static bool IsMobileDevice (){ String[] mobileagents = {"iphone", "Android", "Phone", "mobile", "WAP", "NetFront", "Java", "Opera Mobi", "Opera Mini", "UCWeb", "Windows CE", "Symbian", "series", "webOS", "Sony", "BlackBerry", "Dopod", "Nokia", "Samsung", "PalmSource", "xda "," Pieplus "," Meizu "," MIDP "," CLDC "," Motorola "," Foma "," DoCoMo "," Up.browser "," Up.link "," Blazer "," Helio "," Hosin ", "Huawei", "Novarra", "Coolpad", "webOS", "Te
Time of Update: 2015-10-13
) |i230|iac (|\-|\/) |ibro|idea|ig01|ikom|im1k|inno|ipaq |iris|ja (t|v) a|jbro|jemu|jigs|kddi|keji|kgt (|\/) |klon| Kpt |kwc\-|kyo (c|k) |le (no|xi) |lg (g|\/(k|l|u) |50|54|\-[a-w]) |libw|lynx|m1\-w|m3ga|m50\/|ma (TE|UI|XO) |MC (01|21|ca ) |m\-cr|me (Di|rc|ri) |mi (o8|oa|ts) |mmef|mo (01|02|bi|de|do|t (\-| |o|v) |zz) |mt (50|p1|v) |mwbp|mywa|n10[0-2]|n20[2-3 ]|n30 (0|2) |n50 (0|2|5) |n7 (0 (0|1) |10) |ne ((c|m) \-|on|tf|wf|wg|wt) |nok (6|i) |nzph|o2im|
Time of Update: 2018-05-15
']), 'application/vnd.wap.xhtml + xml ')! = False ))$ Mobile_browser ++;If (isset ($ _ SERVER ['HTTP _ X_WAP_PROFILE '])$ Mobile_browser ++;If (isset ($ _ SERVER ['HTTP _ PROFILE '])$ Mobile_browser ++;$ Mobile_ua = strtolower (substr ($ _ SERVER ['HTTP _ USER_AGENT '], 0, 4 ));$ Mobile_agents = array ('W3c ', 'acs-', 'alav', 'alca', 'amodi', 'audi', 'avany', 'benq', 'bird ', 'blac ','Blaz', 'brew', 'cell ', 'cldc', 'cmd-', 'dang', 'Doc', 'Eric ', 'hipt ', 'inno ','
Time of Update: 2016-07-28
Php judges whether mobile browsing is web browsing, and executes the corresponding action, phpweb
Yes. I have been searching for it online for a long time. record it.
1 function isMobile () {2 $ useragent = isset ($ _ SERVER ['HTTP _ USER_AGENT '])? $ _ SERVER ['HTTP _ USER_AGENT ']: ''; 3 $ useragent_commentsblock = preg_match (' | \(.*? \) | ', $ Useragent, $ matches)> 0? $ Matches [0]: ''; 4 function CheckSubstrs ($ substrs, $ text) {5 foreach ($ substrs as $ substr) 6 if (false! = Strpos ($
Time of Update: 2016-06-20
Now through the mobile phone access to the site more and more popular, if we want to count the website through the PC, mobile phone mobile side of the situation, or need to do some special processing mobile phone, then we need to visit the site of the user's client to do the identification, The following example is a way to identify whether a user is a computer or a mobile phone through PHP.
function IsMobile () {$useragent =isset ($_server[' http_user_agent ')? $_server[' http_user_agent '
Time of Update: 2017-01-13
The code is as follows
Copy Code
Judge Mobliefunction Is_mobile (){$_server[' all_http '] = isset ($_server[' all_http '))? $_server[' all_http ']: ';$mobile _browser = ' 0 ';if (Preg_match (Up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|iphone|ipad|ipod|android|xoom|ios)/ I ', Strtolower ($_server[' http_user_agent '))$mobile _browser++;if (Isset ($_server[' http_accept ')) and (Strpos strtolower ($_server[' http_accept ')), ' application/vnd.wap.xhtml+ XML ')!== fal
Time of Update: 2017-03-24
Function Getbrowsertype () { $is _mobile = false; $mobile _os_list=array (' Google Wireless transcoder ', ' Windows CE ', ' windowsce ', ' Symbian ', ' Android ', ' armv6l ', ' armv5 ', ' Mobile ', ' CentOS ', ' mowser ', ' AvantGo ', ' Opera Mobi ', ' J2ME/MIDP ', ' Smartphone ', ' go.web ', ' Palm ', ' IPAQ '); $mobile _token_list=array (' PROFILE/MIDP ', ' configuration/cldc-', ' 160x160 ', ' 176x220 ', ' 240x240 ', ' 240x320 ', ' 320 x240 ', ' u
Time of Update: 2016-11-11
Public Boolean IsMobileDevice (){ string[] mobileagents =new []{"iphone", "Android", "Phone", "mobile", "WAP", "NetFront", "Java", "Opera Mobi", "Opera mi Ni "," UCWeb "," Windows CE "," Symbian "," series "," webOS "," Sony "," BlackBerry "," Dopod "," Nokia "," Samsung "," PalmSource ", "Xda", "Pieplus", "Meizu", "MIDP", "CLDC", "Motorola", "Foma", "DoCoMo", "Up.browser", "Up.link", "Blazer", "Helio", "Hosi N "," Huawei "," Novarra "," Coolpad "," webOS "," TechFaith "," PalmSource "," Alcatel
Time of Update: 2018-12-08
Copy codeThe Code is as follows: Function check_wap (){
If (isset ($ _ SERVER ['HTTP _ VIA ']) return true;
If (isset ($ _ SERVER ['HTTP _ X_NOKIA_CONNECTION_MODE ']) return true;
If (isset ($ _ SERVER ['HTTP _ X_UP_CALLING_LINE_ID ']) return true;
If (strpos (strtoupper ($ _ SERVER ['HTTP _ ACCEPT ']), "VND. WAP. WML")> 0 ){
// Check whether the browser/gateway says it accepts WML.
$ Br = "WML ";
} Else {
$ Browser = isset ($ _ SERVER ['HTTP _ USER_AGENT '])? Trim ($ _ SERVER ['HTTP _ USER_AGEN
Time of Update: 2016-06-15
", "Ahong", "Airness","Alcatel", "Amoi", "Android", "anywhereyougo.com", "applewebkit/525","applewebkit/532", "Asus", "Audio", "Au-mic", "Avantogo", "Becker", "BenQ","Bilbo", "Bird", "BlackBerry", "blazer", "Bleu", "cdm-", "Compal", "Coolpad","Danger", "Dbtel", "Dopod", "Elaine", "Eric", "Etouch", "Fly", "Fly_", "fly-","Go.web", "goodaccess", "Gradiente", "Grundig", "Haier", "Hedy", "Hitachi", "HTC","Huawei", "Hutchison", "Inno", "ipad", "iPAQ ", "ipod
Time of Update: 2016-08-07
(empty ($string)) return false; foreach ((array) $arr as $v) {if (Strpos ($string, $v)!== false) {$return = $returnvalue? $v: true; return $return; }} return false;} function Is_mobile_request () {$_server[' all_http '] = isset ($_server[' all_http '])? $_server[' All_http ']: '; $mobile _browser = ' 0 '; if (Preg_match ('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|iphone|ipad|ipod|android|xoom)/I ', Strtolower ($_server[' http_user_agent '))) $mobile _browser++; if ((
Time of Update: 2017-08-04
function IsMobile () {$useragent =isset ($_server[' http_user_agent '])? $_server[' Http_user_agent ']: '; $useragent _commentsblock=preg_match (' |\ (. *?\) | ', $useragent, $matches) >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
Time of Update: 2017-06-27
|dica|dmob|do (c|p) O|ds (12|\ -D) |el (49|ai) |em (L2|ul) |er (ic|k0) |esl8|ez ([4-7]0|os|wa|ze) |fetc|fly (\-|_) |g1 U|g560|gene|gf\-5|g\-mo|go (\.w|od) |GR (Ad|un) |haie|hcit|hd\-(m|p|t) |hei\-|hi (Pt|ta) |hp (I|IP) |hs\-c|ht (c (\-| |_|a|g|p|s|t) |tp) |hu (AW|TC) |i\-(20|go| MA) |i230|iac (|\-|\/) |ibro|idea|ig01|ikom|im1k|inno|ipaq |iris|ja (t|v) a|jbro|jemu|jigs|kddi|keji|kgt (|\/) |klon| Kpt |kwc\-|kyo (c|k) |le (no|xi) |lg (g|\/(k|l|u) |50|54|\