Home > Backend Development > PHP Tutorial > WEB页面如何得知用户当前是手机访问还是通过3G/4G网络访问?

WEB页面如何得知用户当前是手机访问还是通过3G/4G网络访问?

WBOY
Release: 2016-06-06 20:14:19
Original
1485 people have browsed it

隐约记得以前好象哪里看到过有什么header信息可以进行判断,要用了找不到了。
应该是只要通过移动网络访问,运营商会在header里面添加点什么信息。能有人给一下不?

回复内容:

隐约记得以前好象哪里看到过有什么header信息可以进行判断,要用了找不到了。
应该是只要通过移动网络访问,运营商会在header里面添加点什么信息。能有人给一下不?

这个是浏览器的原因吧,

安卓微信UserAgent,里边有一个NetType/WIFI

<code>Mozilla/5.0 (Linux; U; Android 4.4.4; zh-cn; m1 note Build/KTU84P) AppleWebKit/533.1 (KHTML, like Gecko)Version/4.0 MQQBrowser/5.4 TBS/025489 Mobile Safari/533.1 MicroMessenger/6.3.13.49_r4080b63.740 NetType/WIFI Language/zh_CN</code>
Copy after login

ios微信UserAgent同样NetType/WIFI

WEB页面如何得知用户当前是手机访问还是通过3G/4G网络访问?

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template