審核IP檢測前端接口
「防」通過部署在HTML網頁中,檢測到人工審核和機器人審核所在IP位址,然後跳轉A/B不同網頁。
騰訊IP檢測(微信、QQ)
接口鏈接:https://fangfeng.yyds5.eu.org/tencent
參數值 | 說明 |
---|---|
city | 值為1時則匹配更多城市的IP位址,存在誤判可能性 |
返回值 | 說明 |
---|---|
IP Pass | 當前IP位址通過檢測 |
IP Risky | 檢測到當前IP位址可能是審核所在IP位址 |
Url Error | 接口鏈接錯誤 |
Domain Unauthorized | 域名未授權 |
代碼示例:
1<head>
2 ...
3 <script>
4 // 建議放在<head></head>裏,優先執行
5 var xhttp = new XMLHttpRequest();
6 xhttp.open('get', 'https://fangfeng.yyds5.eu.org/tencent?city=0', false);
7 xhttp.send(null);
8 if (xhttp.responseText == "IP Risky") {
9 // 檢測到當前IP位址可能是審核所在IP位址
10 // 跳轉B網頁,隻給審核人員看
11 location.href = "/B.html";
12 } else {
13 // 跳轉A網頁,隻給正常用戶看
14 location.href = "/A.html";
15 }
16 </script>
17 ...
18</head>