rssreaderAction($allnewsUrl); $guideList = $this->rssreaderAction($guideUrl); $tList = $this->rssreaderAction($tUrl); $newcarList = $this->rssreaderAction($newcarUrl); $eList = $this->rssreaderAction($eUrl); $salesList = $this->rssreaderAction($salesUrl); $recallsList = $this->rssreaderAction($recallsUrl); $servicingList = $this->rssreaderAction($servicingUrl); $insuranceList = $this->rssreaderAction($insuranceUrl); $ultratuneList = $this->rssreaderAction($ultratuneUrl); $automotiveList = $this->rssreaderAction($automotiveUrl); $trafficList = $this->rssreaderAction($trafficUrl); $tireList = $this->rssreaderAction($tireUrl); $this->view->allnewsList = $allnewsList; $this->view->guideList = $guideList; $this->view->tList = $tList; $this->view->newcarList = $newcarList; $this->view->eList = $eList; $this->view->salesList = $salesList; $this->view->recallsList = $recallsList; $this->view->servicingList = $servicingList; $this->view->insuranceList = $insuranceList; $this->view->ultratuneList = $ultratuneList; $this->view->automotiveList = $automotiveList; $this->view->trafficList = $trafficList; $this->view->tireList = $tireList; } public function rssreaderAction($uri) { $rssArray = array(); try { $rssreader = Zend_Feed::import($uri); } catch (Zend_Feed_Exception $e) { echo "导入Feed异常:$e->getMessage()\n"; exit(); } foreach ($rssreader->items as $item) { $rssArray[] = array( 'title' => $item->title(), 'link' => $item->link(), 'description' => $item->description(), ); } return $rssArray; } }