Re: Best way to get the remote IP address?
| From: | Jimmy | Date: | Tue, 22 Jan 2002 03:57:50 +0000 |
| Subject: | Re: Best way to get the remote IP address? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-81482@lists.php.net to get a copy of this message | ||
> either $HTTP_SERVER_VARS['REMOTE_ADDR'] or simply $REMOTE_ADDR (if you use
> $REMOTE_ADDR in functions make sure you do a global on it first) - I
> personally use $REMOTE_ADDR, but you should read the docs for details...
using $REMOTE_ADDR directly is fine as long as the
"register_global" setting is off.
otherwise, it's wiser to use getenv('REMOTE_ADDR') instead of
$REMOTE_ADDR directly.
--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Failure doesn't mean you'll never make it. It just means it may take longer.