Page 1 of 1

Problem about getting visitor's IP address

Posted: Fri Feb 28, 2003 5:40 am
by panjian
I know that use REMOTE_ADDR can get the first IP address of the visitor.If he is using a proxy,the I can use HTTP_X_FORWARD_FOR to get his real IP address.But now the proxy is that he is using two proxies.First he shuold througn the first proxy to connect with the sencond proxy,then he visits websites with the help of the second proxy.How can I get his real IP address?(I mean that I want to get his computer's IP address,not the first proxy's IP address)
Please help me.Thanks!

Posted: Fri Feb 28, 2003 6:21 am
by BDKR
What I'm curious about is if the person is using IP masquerading. Are you telling me that you could get the persons real IP address from that? I've never seen anyone able to get the address of my, or any other machines on the network. What's allways provided to them is the IP of the firewall.

Cheers,
BDKR

Posted: Fri Feb 28, 2003 6:36 am
by volka
some proxies add the real ip to a http request. But all HTTP_X_... headers are optional, courtesy of the proxy and almost everywhere turned off by default.

Posted: Fri Feb 28, 2003 8:09 pm
by panjian
So you mean that I can't get the real IP address of the visitor?
We use computers of our department.And all computers should through the proxy of our department to connect the proxy of our university.Then through the proxy of our university,we can visitor the world wide web.If I can get the IP address of the visitor's computer,the online static always says there's only a visitor on my forum.But the real situation is there're more than one visitor on my forum.
Can this problem be solved?

Posted: Sat Mar 01, 2003 1:55 pm
by twigletmac
If you use sessions you can set a session variable for each user so even if they have the same IP they'll be unique. Or you could just cookie them.

http://www.php.net/manual/en/ref.session.php
http://www.php.net/manual/en/function.setcookie.php

Mac