public static function getIpFromHeader()
    {
        $general = Config::getInstance()->General;
        $clientHeaders = @$general['proxy_client_headers'];
        if (!is_array($clientHeaders)) {
            $clientHeaders = array();
        }

        $default = '0.0.0.0';
        if (isset($_SERVER['REMOTE_ADDR'])) {
            $default = $_SERVER['REMOTE_ADDR'];
        }

        $ipString = self::getNonProxyIpFromHeader($default, $clientHeaders);
        return IPUtils::sanitizeIp($ipString);
    }
public static function getIpFromHeader()
    {
        $general = Config::getInstance()->General;
        $clientHeaders = @$general['proxy_client_headers'];
        if (!is_array($clientHeaders)) {
            $clientHeaders = array();
        }

        $default = '0.0.0.0';
        if (isset($_SERVER['REMOTE_ADDR'])) {
            $default = $_SERVER['REMOTE_ADDR'];
        }

        $ipString = self::getNonProxyIpFromHeader($default, $clientHeaders);
        return IPUtils::sanitizeIp($ipString);
    }
public static function getIpFromHeader ( ) { $ general = Config :: getInstance ( ) -> General ; $ clientHeaders = @ $ general [ 'proxy_client_headers' ] ; if ( ! is_array ( $ clientHeaders ) ) { $ clientHeaders = array ( ) ; } $ default = '0.0.0.0' ; if ( isset ( $ _SERVER [ 'REMOTE_ADDR' ] ) ) { $ default = $ _SERVER [ 'REMOTE_ADDR' ] ; } $ ipString = self :: getNonProxyIpFromHeader ( $ default , $ clientHeaders ) ; return IPUtils :: sanitizeIp ( $ ipString ) ; }
Returns the most accurate IP address available for the current user, in
IPv4 format. This could be the proxy client's IP address.

@return string IP address in presentation format.
Returns the most accurate IP address available for the current user in IPv4 format . This could be the proxy client s IP address .