Zend Framework Feed
程序员文章站
2022-04-30 23:37:19
...
跳至
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; } }
上一篇: 让页面动起来的WOW.js
推荐阅读
-
PHP 开发环境配置(Zend Studio)
-
Zend Framework页面缓存实例
-
非常好用的Zend Framework分页类
-
.NET Core/Framework如何创建委托大幅度提高反射调用的性能详解
-
asp.net在iis7中更改网站的.net framework框架版本的方法(图)
-
asp.net在iis7中更改网站的.net framework框架版本的方法(图)
-
zend studio怎么修改html文件中PHP代码颜色?
-
PHP 源代码分析 Zend HashTable详解第1/3页
-
Window 2003 IIS + MySQL + PHP + Zend 环境配置
-
IIS下配置Php+Mysql+zend的图文教程(完整版)