Block/prevent users with proxies?

Husbarn

Junior Member
Joined
Dec 19, 2012
Messages
160
Reaction score
20
Is there an easy way how I could prevent/block a user if a user uses proxy?

I don't want people with proxies to access my site. How I can do it?
 
If you know a little bit php you can make a blocker very easy, here is a basic example

PHP:
if (
      $_SERVER['HTTP_X_FORWARDED_FOR']
   || $_SERVER['HTTP_X_FORWARDED']
   || $_SERVER['HTTP_FORWARDED_FOR']
   || $_SERVER['HTTP_CLIENT_IP']
   || $_SERVER['HTTP_VIA']
   || in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554))
   || @fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 30)){    exit('Proxy detected');}
 
With PHP coding you can easily prevent users with proxies. I think you already got a coding on how to block users with proxies.
 
this code may help you to detect only free public proxies.
 
Would that code work with anonymous proxies that are not public?
 
Back
Top