= 0; $i--) { if (!in_array($hops[$i], $trusted, true)) return $hops[$i]; } // Every hop is a trusted proxy; the left-most is the origin. return count($hops) ? $hops[0] : $remoteAddr; } ?>