FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Proxy Block





DanielXP
Code:
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) || ($_SERVER['HTTP_USER_AGENT']=='') || ($_SERVER['HTTP_VIA']!='')){
        die("Don't use proxies, please.");
}


Hey I found the script above on some site and I have a question.

Would it block proxys?
ChrisCh
I tried it on a test page, and for me it's actually doing the opposite. When I visit the page normally (ie not through a proxy, it says "Don't use proxies, please.", but whenever I tried it through various web proxies, it said "No proxy used" (i added an else statement to the end).

Smile
jabapyth
so now you can just use
Code:
if(!(isset($_SERVER['HTTP_X_FORWARDED_FOR']) || ($_SERVER['HTTP_USER_AGENT']=='') || ($_SERVER['HTTP_VIA']!=''))){
        die("Don't use proxies, please.");
}
Related topics
three restaurants on the same block
web proxy
Proxy Ports..
You can find new proxy address at here
Bondings please.. regarding proxy ports..
How to protect LAN against Worms and spyware?
proxy
Paid hosting
About the Proxy server
Download Manager
Block Proxy's
Fantasy PC Community *5000 Articles*10 Members A Day*
I need to create proxy server in our network.
How do technicians ban sites
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.