本帖最后由 finder 于 2014-12-29 15:06 编辑 " Q) G+ `; b9 S/ n5 k
" H6 M7 Y& h. E+ f% x% C, h有时候做好一个landing page, 但是希望过滤掉代理流量, 可以用下面这段PHP代码来检测, 稍加修改就可以过滤了:- <?php8 n* ~9 v9 s. {7 Y; a, U, D
- if($_SERVER['HTTP_X_FORWARDED_FOR'] || $_SERVER['HTTP_VIA'] ||
' p2 [/ v" X9 H! \/ Y& R, I6 n# D - $_SERVER['HTTP_PROXY_CONNECTION'] || $_SERVER['HTTP_USER_AGENT_VIA'] || % A. S7 q8 @7 q+ n2 }3 M- g$ }
- $_SERVER['HTTP_CACHE_INFO'] || $_SERVER['HTTP_XROXY_CONNECTION']){
! L+ C; H1 M/ e - echo 'Your are using Proxy!';
& k3 L2 K7 e2 b: h - }else{ echo 'Your are Not using Proxy!'; }; q3 m3 h+ k5 Q4 v6 F. F
- ?>
复制代码 Enjoy it and hope it can help you.
: I* o, m6 x8 y$ t7 c" f; `: }0 [
- W! b/ s/ H: }# C |