• [deleted]

IF visitor use http proxy to visite my site
the $REMOTE_ADDR just equal the ip addr of the proxy!

is there any functions can get the true ip of the visitor
behind the http proxy??

    take a look here
    read the user notes too

    hope that helps

      You can request HTTP_X_FORWARDED_FOR and see if the proxy is willing to give up the IP address.

      if (getenv('HTTP_X_FORWARDED_FOR')) {
      $ip = getenv('HTTP_X_FORWARD_FOR');
      } else {
      $ip = getenv('REMOTE_ADDR');
      }

      Another option, if it's available to you, is to offer a secure connection. Sometimes browsers will surpass the proxy on an https address. This is a method Steve Gibson uses on his security port check for visitors behind a firewall. If that doesn't work, he offers a little executable for them to download which makes sure he is connecting to them and not the firwall.

        Originally posted by malbera
        take a look here
        read the user notes too

        hope that helps

        Wow, I am gonna start reading the user notes more often. Lot of good stuff there!

          • [deleted]

          <?php
          if (getenv('HTTP_X_FORWARDED_FOR')) {
          $ip = getenv('HTTP_X_FORWARD_FOR');
          } else {
          $ip = getenv('REMOTE_ADDR');
          }
          echo $ip;
          ?>

          IT does not Work
          I use http proxy to test
          211.161.171.3 port 8080

          my real ip address is 211.83.102.XXX

          when I connect to the page directly
          the result is 211.83.102.XXX
          but with http proxy
          the result is
          211.161.171.3
          not as expacted!!!!!!!!!!!!!!!!!

            Originally posted by jd023
            IT does not Work
            I use http proxy to test
            211.161.171.3 port 8080

            my real ip address is 211.83.102.XXX

            when I connect to the page directly
            the result is 211.83.102.XXX
            but with http proxy
            the result is
            211.161.171.3
            not as expacted!!!!!!!!!!!!!!!!!

            That means you have a good proxy! 😃

            Not all proxies will answer the request for forwarded information, it can't be relied on at all.

              • [deleted]

              You mean there is no other method avilable???

              if the proxy does not give the ip
              no way?

              thanks

                Isnt one of the ideas behind having a proxy server, so it will act as a kind of firewall to stop people from finding your IP?

                  • [deleted]

                  My perpose is
                  record the guests' real ip if he or she wrote words

                  
                  on my guest book!
                  
                  so if he use http proxy 
                  I just record the proxy ip!!
                  
                  that is not expected

                    You want to bypass their proxy to record their IP in a guest book? WHY? I don't have to explain to you why people hide behind proxies. After all, look at your own post up above where you freely gave out your own proxy IP yet hid your real IP address. Even for private recording of the IP, the proxy should be plenty good for an IP address as it does provide a means of traceability.

                      Come on guys, this is a good subject, anyone have any idea how we can get the real IP. Because this way if we block the http proxy IP we'll block all the people who are using the same http proxy IP.

                      Please share us your thinking 🙂

                        There is NO way to get the real ip threw server side scripts.. Why you think some ppl use proxies to hide there ip. Only one way to get to get the root ip, and that is to have there isp trace there activities.. Witch only the government would do.

                        Also you want to make sure the getenv('HTTP_X_FORWARDED_FOR') != unknown.. Cuz some proxies do that.

                          Write a Reply...