public function fetch($url, array $params = array())
    {
        $params = array_merge(array(
            'curl' => array(),
            'fopen' => array(),
        ), $params);

        if (function_exists('curl_init') && $this->config['prefer_curl']) {
            return $this->curl($url, $params['curl']);
        }

        return $this->fileGetContents($url, $params['fopen']);
    }
public function fetch($url, array $params = array())
    {
        $params = array_merge(array(
            'curl' => array(),
            'fopen' => array(),
        ), $params);

        if (function_exists('curl_init') && $this->config['prefer_curl']) {
            return $this->curl($url, $params['curl']);
        }

        return $this->fileGetContents($url, $params['fopen']);
    }
public function fetch ( $ url , array $ params = array ( ) ) { $ params = array_merge ( array ( 'curl' => array ( ) , 'fopen' => array ( ) , ) , $ params ) ; if ( function_exists ( 'curl_init' ) && $ this -> config [ 'prefer_curl' ] ) { return $ this -> curl ( $ url , $ params [ 'curl' ] ) ; } return $ this -> fileGetContents ( $ url , $ params [ 'fopen' ] ) ; }
Executes http requests

@param string $url
@param array $params Additional parameters for the respective part
@return string

@throws Exception when an error ocurred or if no way to do a request exists
Executes http requests