protected function request($url) {
        $this->logger->debug("Querying Steam Web API: " . str_replace(self::$apiKey, 'SECRET', $url));

        $data = file_get_contents($url);

        if(empty($data)) {
            preg_match('/^.* (\d{3}) (.*)$/', $http_response_header[0], $http_status);

            if($http_status[1] == 401) {
                throw new WebApiException(WebApiException::UNAUTHORIZED);
            }

            throw new WebApiException(WebApiException::HTTP_ERROR, $http_status[1], $http_status[2]);
        }

        return $data;
    }
protected function request($url) {
        $this->logger->debug("Querying Steam Web API: " . str_replace(self::$apiKey, 'SECRET', $url));

        $data = file_get_contents($url);

        if(empty($data)) {
            preg_match('/^.* (\d{3}) (.*)$/', $http_response_header[0], $http_status);

            if($http_status[1] == 401) {
                throw new WebApiException(WebApiException::UNAUTHORIZED);
            }

            throw new WebApiException(WebApiException::HTTP_ERROR, $http_status[1], $http_status[2]);
        }

        return $data;
    }
protected function request ( $ url ) { $ this -> logger -> debug ( "Querying Steam Web API: " . str_replace ( self :: $ apiKey , 'SECRET' , $ url ) ) ; $ data = file_get_contents ( $ url ) ; if ( empty ( $ data ) ) { preg_match ( '/^.* (\d{3}) (.*)$/' , $ http_response_header [ 0 ] , $ http_status ) ; if ( $ http_status [ 1 ] == 401 ) { throw new WebApiException ( WebApiException :: UNAUTHORIZED ) ; } throw new WebApiException ( WebApiException :: HTTP_ERROR , $ http_status [ 1 ] , $ http_status [ 2 ] ) ; } return $ data ; }
Fetches data from Steam Web API using the specified URL

@param string $url The URL to load
@return string The data returned by the Web API
@throws WebApiException if the request failed
Fetches data from Steam Web API using the specified URL