for a tracker i need the visitors ip. last time i coded it with javascript, which calls an image with ip as a parameter.
but it would be much more cleaner, if the ip would be logged right when the script is called.
seaz' stefan
Use getenv(REMOTE_ADDR)
I almost forgot one thing. If user is in the ISP Cache server, the HTTP_X_FORWARDED_FOR is also set.
if (getenv(HTTP_X_FORWARDED_FOR)){ $ip=getenv(HTTP_X_FORWARDED_FOR); } else { $ip=getenv(REMOTE_ADDR); }
hey, so easy! thank you.