PHP get real IP (proxy detection)
I do get track the "real" IP of an user, if he has an proxy wich sends the header of the real IP... does any of have a better solution, or even more headers? Since this function is used very often in the script, it has to be very fast, and it does not seem in that constellation :/ A few suggestions I came up with, but could not realise: put the headers in the order, what is used the most "in the wild", sothat the functions finishes fast making the pre_match-detecting for IP faster === function get_real_ip() { $proxy_headers = array( 'CLIENT_IP', 'FORWARDED', 'FORWARDED_FOR', 'FORWARDED_FOR_IP'