tags:

views:

48

answers:

2

How to detect anonymous user like facebook does, when you open it throught proxy websites like hidemyass.com. I think its something related to proxy, but beyond I dont know anything about it, but I want to create that.

+1  A: 

Most common way to detect proxy servers is by looking if these http headers fields are empty (if not, a proxy is used to access you're webserver):

  • HTTP_FORWARDED
  • HTTP:X-Forwarded
  • HTTP:Forwarded-For
  • HTTP:X-Forwarded-For

In PHP you can read these values with the getenv() function.

Kdeveloper
BTW this will not detect real stealth proxies and that it also detects proxies that are in use at companies, schools, etc.
Kdeveloper
@Kdeveloper Exactly. Bit quick to accept this answer mrNepal I think.
bzlm
A: 

It is hard to say who is trying to hide his identity and who has limited/restricted access based on firewall rules etc. You can also check if user accept COOKIES by sending special token on first request and fetching on second.

Nazariy