Add better client ip detection with $_SERVER['HTTP_X_FORWARDED_FOR'] if behind a proxy
The ip address was my apache proxy address, now its the client ip address or the client public proxy. Tested without proxy(My FAI), with the proxy at my work, and with the ssh proxy of my server.