Dennis1993
2013-07-26 4bf322d256d0460a2df5c03b1e173f6ccd9a6eb3
program/lib/Roundcube/rcube_utils.php
@@ -666,6 +666,21 @@
    /**
     * Returns the real remote IP address
     *
     * @return string Remote IP address
     */
    public static function remote_addr()
    {
        foreach (array('HTTP_X_FORWARDED_FOR','HTTP_X_REAL_IP','REMOTE_ADDR') as $prop) {
            if (!empty($_SERVER[$prop]))
                return $_SERVER[$prop];
        }
        return '';
    }
    /**
     * Read a specific HTTP request header.
     *
     * @param  string $name Header name