src/Helpers/NetworkInfoHelper.php
public static function GetClientIpServer() {
        $ipaddress = '';
        if ($_SERVER['HTTP_CLIENT_IP'])
            $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
        else if ($_SERVER['HTTP_X_FORWARDED_FOR'])
            $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
        else if ($_SERVER['HTTP_X_FORWARDED'])
            $ipaddress = $_SERVER['HTTP_X_FORWARDED'];
        else if ($_SERVER['HTTP_FORWARDED_FOR'])
            $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
        else if ($_SERVER['HTTP_FORWARDED'])
            $ipaddress = $_SERVER['HTTP_FORWARDED'];
        else if ($_SERVER['REMOTE_ADDR'])
            $ipaddress = $_SERVER['REMOTE_ADDR'];
        else
            $ipaddress = 'UNKNOWN';

        return $ipaddress;
    }
public static function GetClientIpServer() {
        $ipaddress = '';
        if ($_SERVER['HTTP_CLIENT_IP'])
            $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
        else if ($_SERVER['HTTP_X_FORWARDED_FOR'])
            $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
        else if ($_SERVER['HTTP_X_FORWARDED'])
            $ipaddress = $_SERVER['HTTP_X_FORWARDED'];
        else if ($_SERVER['HTTP_FORWARDED_FOR'])
            $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
        else if ($_SERVER['HTTP_FORWARDED'])
            $ipaddress = $_SERVER['HTTP_FORWARDED'];
        else if ($_SERVER['REMOTE_ADDR'])
            $ipaddress = $_SERVER['REMOTE_ADDR'];
        else
            $ipaddress = 'UNKNOWN';

        return $ipaddress;
    }
public static function GetClientIpServer ( ) { $ ipaddress = '' ; if ( $ _SERVER [ 'HTTP_CLIENT_IP' ] ) $ ipaddress = $ _SERVER [ 'HTTP_CLIENT_IP' ] ; else if ( $ _SERVER [ 'HTTP_X_FORWARDED_FOR' ] ) $ ipaddress = $ _SERVER [ 'HTTP_X_FORWARDED_FOR' ] ; else if ( $ _SERVER [ 'HTTP_X_FORWARDED' ] ) $ ipaddress = $ _SERVER [ 'HTTP_X_FORWARDED' ] ; else if ( $ _SERVER [ 'HTTP_FORWARDED_FOR' ] ) $ ipaddress = $ _SERVER [ 'HTTP_FORWARDED_FOR' ] ; else if ( $ _SERVER [ 'HTTP_FORWARDED' ] ) $ ipaddress = $ _SERVER [ 'HTTP_FORWARDED' ] ; else if ( $ _SERVER [ 'REMOTE_ADDR' ] ) $ ipaddress = $ _SERVER [ 'REMOTE_ADDR' ] ; else $ ipaddress = 'UNKNOWN' ; return $ ipaddress ; }
Get the client ip from the server global variable.

@return string
The IP address of client.
Get the client ip from the server global variable .