![]() Preserved Topic: Get IP of client in PHP (Page 1 of 1) |
|
---|---|
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
![]() Hey everyone, |
Bipolar (III) Inmate From: Berlin, Germany |
![]() if (getenv(HTTP_X_FORWARDED_FOR)) { $onlineip = getenv(HTTP_X_FORWARDED_FOR); } |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
![]() Just thought I'd add that you can reference the variables like so: |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
![]() thanx, everyone. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() when in doubt just make a page like so |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
![]() 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 |
![]() Jiblet, I prefer to use getenv() for two reasons... |