public static function ip()
    {
        if (getenv('HTTP_CLIENT_IP')) {
            $ip = getenv('HTTP_CLIENT_IP');
        } elseif (getenv('HTTP_X_FORWARDED_FOR')) {
            $ip = getenv('HTTP_X_FORWARDED_FOR');
        } elseif (getenv('HTTP_X_FORWARDED')) {
            $ip = getenv('HTTP_X_FORWARDED');
        } elseif (getenv('HTTP_FORWARDED_FOR')) {
            $ip = getenv('HTTP_FORWARDED_FOR');
        } elseif (getenv('HTTP_FORWARDED')) {
            $ip = getenv('HTTP_FORWARDED');
        } elseif (getenv('REMOTE_ADDR')){
            $ip = getenv('REMOTE_ADDR');
        } else {
            $ip = 'UNKNOWN';
        }

        return $ip;
    }
public static function ip()
    {
        if (getenv('HTTP_CLIENT_IP')) {
            $ip = getenv('HTTP_CLIENT_IP');
        } elseif (getenv('HTTP_X_FORWARDED_FOR')) {
            $ip = getenv('HTTP_X_FORWARDED_FOR');
        } elseif (getenv('HTTP_X_FORWARDED')) {
            $ip = getenv('HTTP_X_FORWARDED');
        } elseif (getenv('HTTP_FORWARDED_FOR')) {
            $ip = getenv('HTTP_FORWARDED_FOR');
        } elseif (getenv('HTTP_FORWARDED')) {
            $ip = getenv('HTTP_FORWARDED');
        } elseif (getenv('REMOTE_ADDR')){
            $ip = getenv('REMOTE_ADDR');
        } else {
            $ip = 'UNKNOWN';
        }

        return $ip;
    }
public static function ip ( ) { if ( getenv ( 'HTTP_CLIENT_IP' ) ) { $ ip = getenv ( 'HTTP_CLIENT_IP' ) ; } elseif ( getenv ( 'HTTP_X_FORWARDED_FOR' ) ) { $ ip = getenv ( 'HTTP_X_FORWARDED_FOR' ) ; } elseif ( getenv ( 'HTTP_X_FORWARDED' ) ) { $ ip = getenv ( 'HTTP_X_FORWARDED' ) ; } elseif ( getenv ( 'HTTP_FORWARDED_FOR' ) ) { $ ip = getenv ( 'HTTP_FORWARDED_FOR' ) ; } elseif ( getenv ( 'HTTP_FORWARDED' ) ) { $ ip = getenv ( 'HTTP_FORWARDED' ) ; } elseif ( getenv ( 'REMOTE_ADDR' ) ) { $ ip = getenv ( 'REMOTE_ADDR' ) ; } else { $ ip = 'UNKNOWN' ; } return $ ip ; }
Return the IP address of the current user

@return string ip address
Return the IP address of the current user