setConfig(array( 'timeout' => 1 )); $curl->write(Zend_Http_Client::GET, $this->getFeedUrl(), '1.0'); $data = $curl->read(); if ($data === false) { return false; } $data = preg_split('/^\r?$/m', $data, 2); $data = trim($data[1]); $curl->close(); try { $xml = new SimpleXMLElement($data); } catch (Exception $e) { return false; } return $xml; } /** * Retrieve DB date from RSS date * * @param string $rssDate * @return string YYYY-MM-DD YY:HH:SS */ public function getDate($rssDate) { return gmdate('Y-m-d H:i:s', strtotime($rssDate)); } }