Great HACK !!! Always though, never realized...

Thanks.
Just an addendum: I noticed often I had better results with the HTTP_FORWARDED env var instead of HTTP_X_FORWARDED_FOR you used. I mean, first was filled, the second one no...
Actually there are a lot of vars that could be used, but a sequential check or both of them I think should be enough to catch most proxies...
Thanks again.
Bye