记住用户名密码
function getClientMobileBrand()
{
$agent = $_SERVER['HTTP_USER_AGENT'];
if (preg_match('/iPhone\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = 'iphone';
$mobile_ver = $regs[0];
} elseif (preg_match('/SAMSUNG|Galaxy|GT-|SCH-|SM-\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '三星';
$mobile_ver = $regs[0];
} elseif (preg_match('/Huawei|Honor|H60-|H30-\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '华为';
$mobile_ver = $regs[0];
} elseif (preg_match('/Mi note|mi one\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '小米';
$mobile_ver = $regs[0];
} elseif (preg_match('/HM NOTE|HM201\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '红米';
$mobile_ver = $regs[0];
} elseif (preg_match('/Coolpad|8190Q|5910\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '酷派';
$mobile_ver = $regs[0];
} elseif (preg_match('/ZTE|X9180|N9180|U9180\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '中兴';
$mobile_ver = $regs[0];
} elseif (preg_match('/OPPO|X9007|X907|X909|R831S|R827T|R821T|R811|R2017|PBEM00|PACM00\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = 'OPPO';
$mobile_ver = $regs[0];
} elseif (preg_match('/HTC|Desire\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = 'HTC';
$mobile_ver = $regs[0];
} elseif (preg_match('/Nubia|NX50|NX40\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '努比亚';
$mobile_ver = $regs[0];
} elseif (preg_match('/M045|M032|M355\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '魅族';
$mobile_ver = $regs[0];
} elseif (preg_match('/Gionee|GN\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '金立';
$mobile_ver = $regs[0];
} elseif (preg_match('/HS-U|HS-E\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '海信';
$mobile_ver = $regs[0];
} elseif (preg_match('/Lenove\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '联想';
$mobile_ver = $regs[0];
} elseif (preg_match('/ONEPLUS\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '一加';
$mobile_ver = $regs[0];
} elseif (preg_match('/vivo\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = 'vivo';
$mobile_ver = $regs[0];
} elseif (preg_match('/K-Touch\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '天语';
$mobile_ver = $regs[0];
} elseif (preg_match('/DOOV\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '朵唯';
$mobile_ver = $regs[0];
} elseif (preg_match('/GFIVE\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '基伍';
$mobile_ver = $regs[0];
} elseif (preg_match('/Nokia\s([^\s|;]+)/i', $agent, $regs)) {
$mobile_brand = '诺基亚';
$mobile_ver = $regs[0];
} else {
$mobile_brand = '其他';
}
$re_arr = array();
$re_arr['mobile_brand'] = $mobile_brand;
$re_arr['mobile_ver'] = $mobile_ver;
//echo $mobile_brand;
return $mobile_brand;
}
目前有 0 条留言 其中:访客:0 条, 博主:0 条