In response to mathiasrav's getip() implementation on 28-Jul-2007, it should be noted that it:
- assumes IPv4 addresses only
- returns $_SERVER['REMOTE_ADDR'] for any value of $_SERVER['HTTP_CLIENT_IP'] that matches 127.0.*.*, 192.168.*.* or 10.0.*.*, which is not desirable if you actually WANT the value of HTTP_CLIENT_IP
dlyaza's prior snippet has neither of these problems.