original_string: public function getClientIP()
      {
          if (isset($this->clientIP)) {
              return $this->clientIP;
          }
  
          $tmp_ip = '';
          $x_fwd = null;
  
          //Proxy handling.
          if (array_key_exists('REMOTE_ADDR', $_SERVER)) {
              $tmp_ip = $_SERVER['REMOTE_ADDR'];
          }
  
          if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
              $x_fwd = $_SERVER["HTTP_X_FORWARDED_FOR"];
          }
  
          if (self::$x_forwarded_for && ($x_fwd !== null)) {
              $forwarded = explode(",", $x_fwd);
              return trim($forwarded[0]);
          }
  
          return $tmp_ip;
      }
code: public function getClientIP()
      {
          if (isset($this->clientIP)) {
              return $this->clientIP;
          }
  
          $tmp_ip = '';
          $x_fwd = null;
  
          //Proxy handling.
          if (array_key_exists('REMOTE_ADDR', $_SERVER)) {
              $tmp_ip = $_SERVER['REMOTE_ADDR'];
          }
  
          if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
              $x_fwd = $_SERVER["HTTP_X_FORWARDED_FOR"];
          }
  
          if (self::$x_forwarded_for && ($x_fwd !== null)) {
              $forwarded = explode(",", $x_fwd);
              return trim($forwarded[0]);
          }
  
          return $tmp_ip;
      }
code_tokens: public function getClientIP ( ) { if ( isset ( $ this -> clientIP ) ) { return $ this -> clientIP ; } $ tmp_ip = '' ; $ x_fwd = null ; //Proxy handling. if ( array_key_exists ( 'REMOTE_ADDR' , $ _SERVER ) ) { $ tmp_ip = $ _SERVER [ 'REMOTE_ADDR' ] ; } if ( isset ( $ _SERVER [ "HTTP_X_FORWARDED_FOR" ] ) ) { $ x_fwd = $ _SERVER [ "HTTP_X_FORWARDED_FOR" ] ; } if ( self :: $ x_forwarded_for && ( $ x_fwd !== null ) ) { $ forwarded = explode ( "," , $ x_fwd ) ; return trim ( $ forwarded [ 0 ] ) ; } return $ tmp_ip ; }
docstring: Returns the clients IP address.
  
  @return string
docstring_tokens: Returns the clients IP address .