本帖最后由 finder 于 2014-12-29 15:06 编辑
# v ?' u1 }3 B* I
; P* P! z9 q2 S3 }有时候做好一个landing page, 但是希望过滤掉代理流量, 可以用下面这段PHP代码来检测, 稍加修改就可以过滤了:- <?php
3 r: r% P# e+ {+ { - if($_SERVER['HTTP_X_FORWARDED_FOR'] || $_SERVER['HTTP_VIA'] || " t: ]1 Y/ t5 P; G$ h( F
- $_SERVER['HTTP_PROXY_CONNECTION'] || $_SERVER['HTTP_USER_AGENT_VIA'] || " x2 m5 L/ F }( y
- $_SERVER['HTTP_CACHE_INFO'] || $_SERVER['HTTP_XROXY_CONNECTION']){
: \; j6 c- x, J+ g9 X - echo 'Your are using Proxy!';
" ?3 G' ^* l' r) t. Q* J, ]$ c - }else{ echo 'Your are Not using Proxy!'; }
) `7 k" `, j' G* \! V - ?>
复制代码 Enjoy it and hope it can help you.6 {7 \! s0 d2 D+ Y Q; F
: {3 l5 Z# ?, q N- J% l
|