首先我们通过PHP代码来获取用户访问PHP页面的HTTP请求头部信息
以下是用360浏览器测试捕获到的用户来源请求头
以下是用QQ浏览器测试捕获到的用户来源请求头
我们可以看到不同浏览器的请求头或多或少会有些不同,通过这个分析我们再来看看 手机QQ/微信/支付宝
微信扫码的请求头
Connection:keep-alive
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Linux; Android 8.1.0; vivo X21A Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044705 Mobile Safari/537.36 MMWEBID/5587 MicroMessenger/7.0.4.1420(0x2700043C) Process/tools NetType/WIFI Language/zh_CN
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,image/wxpic,image/sharpp,image/apng,image/tpg,*/*;q=0.8
Accept-Encoding:gzip, deflate
Accept-Language:zh-CN,en-US;q=0.9
手机QQ扫码的请求头
Connection:keep-alive
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Linux; Android 8.1.0; vivo X21A Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 MQQBrowser/6.2 TBS/044803 Mobile Safari/537.36 V1_AND_SQ_8.0.7_1204_YYB_D PA QQ/8.0.7.4085 NetType/WIFI WebP/0.3.0 Pixel/1080 StatusBarHeight/84
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,image/sharpp,image/apng,image/tpg,*/*;q=0.8
Accept-Encoding:gzip, deflate
Accept-Language:zh-CN,en-US;q=0.9
支付宝扫码的请求头
Connection:Keep-Alive
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
X-Requested-With:com.eg.android.AlipayGphone
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Linux; U; Android 8.1.0; zh-CN; vivo X21A Build/OPM1.171019.011) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/69.0.3497.100 UWS/3.18.0.43 Mobile Safari/537.36 UCBS/3.18.0.43_190620172928 NebulaSDK/1.8.100112 Nebula AlipayDefined(nt:WIFI,ws:360|0|3.0) AliApp(AP/10.1.65.6567) AlipayClient/10.1.65.6567 Language/zh-Hans useStatusBar/true isConcaveScreen/true
Accept-Language:zh-CN,en-US;q=0.9
Accept-Encoding:gzip
看到以上的这几个请求头,都有些不同,里面包含了浏览器的一些具体信息版本号/手机系统/手机型号啥的一堆,具体含义自己可以再具体进行分析,通过分析上面的特征则可以进行三合一收款码的地址跳转程序开发编写工作。