本帖最后由 finder 于 2014-12-29 15:06 编辑 $ F e8 n8 D$ D* b% ^3 ?) z0 L
5 T0 I# I. Q8 N$ S% D
有时候做好一个landing page, 但是希望过滤掉代理流量, 可以用下面这段PHP代码来检测, 稍加修改就可以过滤了:- <?php6 t1 W7 r" v, B! U$ L2 X9 K
- if($_SERVER['HTTP_X_FORWARDED_FOR'] || $_SERVER['HTTP_VIA'] ||
' k9 D0 [1 S1 H- W3 c - $_SERVER['HTTP_PROXY_CONNECTION'] || $_SERVER['HTTP_USER_AGENT_VIA'] ||
2 F8 J, G3 f# _* A7 a# {$ b - $_SERVER['HTTP_CACHE_INFO'] || $_SERVER['HTTP_XROXY_CONNECTION']){: t+ ^6 o5 D P, n6 J) ~
- echo 'Your are using Proxy!';6 G E$ q6 J4 M. x* l
- }else{ echo 'Your are Not using Proxy!'; }
# ]' ~5 l; r1 L+ L3 _5 m3 W8 \ - ?>
复制代码 Enjoy it and hope it can help you.
% X, {0 |# i% A: W. D2 n- S' u& q
|