This message was edited by netgert at 2003-12-26 2:52:26
Doesn't this return the address of the client? I think the thing that should be looked for is "referrer". Most browsers send a referrer-header with URL of previous page. You can extract the host name of that URL and resolve it to IP address.
The IP address from which the user is viewing the current page.
The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.
$url = parse_url($_SERVER["HTTP_REFERER"]);
$ip = gethostbyname($url["host"]);
: : Hello All,
: : I am working on shopping cart..I want to know the IP address of the other server...
: : If someone searched my product from google and then he comes to my site..I want to know the IP address of google..The search engine may be anyone..How to accomplish this task...Please help me
: : rajiv
: url--> http://mark.space.servehttp.com