2

I have used the "REMOTE_ADDR" to detect the ip address of the visitors in PHP. But how could i detect the visitors ip address even if he is trying to hide them. I have used "HTTP_X_FORWARDED_FOR" and "HTTP_CLIENT_IP" too. But I am just not able to implement them correctly.

3
  • 1
    Obviously you cannot detect them if they are hiding their IP... Commented Oct 29, 2011 at 15:51
  • 1
    But there must be some method so that we can detect them too. Commented Oct 29, 2011 at 15:52
  • The user obviously wants to protect themselves, but you may be able to find the IP of users who don't have it blocked with a TRY / CATCH or IF / THEN type statement Commented Oct 29, 2011 at 15:57

1 Answer 1

3

It's pretty inherently impossible. The other end could just set up their computer to lie to you entirely. There are things that will get you correct answers more often, but even they're pretty easy to get around. Whatever you're trying to make that requires this, I think you need to seriously reconsider your objectives and design.

Sign up to request clarification or add additional context in comments.

Comments