CBlogUser :: GetUserIP: Bitrix method

      
<?php 
//  CBlogUser :: GetUserIP()
//  /dist/bitrix/modules/blog/general/blog_user.php:610

    
public static function GetUserIP()
    {
        if (
$_SERVER["HTTP_X_FORWARDED_FOR"])
        {
            
$clientIP $_SERVER["HTTP_X_FORWARDED_FOR"];
        }
        else
        {
            
$clientIP $_SERVER["HTTP_CLIENT_IP"];
        }

        
$clientProxy $_SERVER["REMOTE_ADDR"];
        if(
strlen($clientIP) <= 0)
        {
            
$clientIP $clientProxy;
            
$clientProxy "";
        }

        return array(
$clientIP$clientProxy);
    }