Re: IP address
| From: | Justin French | Date: | Sat, 25 Jan 2003 00:48:44 +0000 |
| Subject: | Re: IP address | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-133076@lists.php.net to get a copy of this message | ||
on 24/01/03 1:23 PM, K.C.P. van Zijl (karel@sonosol.nl) wrote:
> Is it possible in PHP to determine the IP address of a server which is
> requesting a page from my own server?
> When I use $REMOTE_ADDR, I get the wrong IP address. In that case I get
> the IP address of a person who is requesting the page on that other
> server.
>
> Hopefully my question is clear enough
Not really!! :)
Here's what happens (sort of):
1. i request a URL on my computer
2. it talks to my ISP
3. my ISP talks to anywhere from 2 to 20 (or more) servers along the way
4. finally connects with the requested URL (your server with PHP)
5. page comes back thru the 2 to 20 servers
6. arrives at my ISP
7. gets sent to my computer
8. I look at the page
So, which one of these computers are you trying to get the IP address of?
Justin French