今天是:2025年4月7日 星期一
记住用户名密码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | function get_user_os() { //获取用户浏览信息参数 $agent = $_SERVER [ 'HTTP_USER_AGENT' ]; //获取操作系统类型 if ( strpos ( $agent , "NT 10.0" )) { $os_name = "Windows 10" ; } elseif ( strpos ( $agent , "NT 6.1" )) { $os_name = "Windows 7" ; } elseif ( strpos ( $agent , "NT 5.1" )) { $os_name = "Windows XP (SP2)" ; } elseif ( strpos ( $agent , "NT 5.2" ) && strpos ( $agent , "WOW64" )) { $os_name = "Windows XP 64-bit Edition" ; } elseif ( strpos ( $agent , "NT 5.2" )) { $os_name = "Windows 2003" ; } elseif ( strpos ( $agent , "NT 6.0" )) { $os_name = "Windows Vista" ; } elseif ( strpos ( $agent , "NT 5.0" )) { $os_name = "Windows 2000" ; } elseif ( strpos ( $agent , "4.9" )) { $os_name = "Windows ME" ; } elseif ( strpos ( $agent , "NT 4" )) { $os_name = "Windows NT 4.0" ; } elseif ( strpos ( $agent , "98" )) { $os_name = "Windows 98" ; } elseif ( strpos ( $agent , "95" )) { $os_name = "Windows 95" ; } else if ( strpos ( $agent , "Android" ) !== false) { $os_name = "Android" ; } else if ( strpos ( $agent , "iPhone" ) !== false) { $os_name = "iPhone" ; } else if ( strpos ( $agent , "Mac" ) !== false) { $os_name = "Mac" ; } else if ( strpos ( $agent , "X11" ) !== false || strpos ( $agent , "Linux" ) !== false) { $os_name = "Linux" ; } else { $os_name = "未知系统" ; } return $os_name ; //判断 /*if(strpos($os_name,"Linux")!==false){ $os_str="Linux操作系统"; }else if(strpos($os_name,"Windows")!==false){ $os_str="Windows操作系统"; }else{ $os_str="未知操作系统"; } return $os_str;*/ } |
目前有 0 条留言 其中:访客:0 条, 博主:0 条