Preserved Topic: Get IP of client in PHP |
|
---|---|
Author | Thread |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 01-04-2002 16:03
Hey everyone, |
Bipolar (III) Inmate From: Berlin, Germany |
posted 01-04-2002 17:47
if (getenv(HTTP_X_FORWARDED_FOR)) { $onlineip = getenv(HTTP_X_FORWARDED_FOR); } |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 01-04-2002 20:54 |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 01-07-2002 17:13
Just thought I'd add that you can reference the variables like so: |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 01-07-2002 17:21
thanx, everyone. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 01-07-2002 18:27
when in doubt just make a page like so |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 01-07-2002 18:31
the problem was, I wasn't looking for phpinfo at all. I was looking for a function to get the clients IP. who knows why they hide it in an enviromental variable... |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 01-07-2002 18:32
Jiblet, I prefer to use getenv() for two reasons... |