public function importUrl($url, $header = false)
{
if (!isset($this->_http)) {
throw new LogicException('Missing http parameter.');
}
try {
$response = $this->_http->get($url);
if ($response->code != 200) {
throw new Horde_Data_Exception(sprintf(Horde_Data_Translation::t("URL %s not found"), $url));
}
$data = $response->getBody();
} catch (Horde_Http_Exception $e) {
throw new Horde_Data_Exception($e);
}
return $this->importData($data, $header);
}