John W. Holmes wrote: >> IP adress not send ?!? And how server communicate with client ? > > A variety of ways. What I meant is that it's not sent in the browser's > headers that it sends to the site, which is where getenv() and > $_SERVER[] would snatch it from.
Correct me if I'm wrong, but shouldn't $_SERVER['REMOTE_ADDR'] always be set if you're using Apache? I've never experienced a case where it was not available. I'm no C guru, but from what I can tell by looking into the source for PHP 4.3.7 and Apache 1.3.28 it looks like Apache makes this variable available to PHP based on the information it stores internally about the currently-open connection to the client (see Apache's "src/main/util_script.c", line 292). Have you experienced a case with Apache & PHP where this variable was not available? Just curious... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php