From 6f95cd6cc627c0b51208c19e88d87ec9c3b860b4 Mon Sep 17 00:00:00 2001 From: Damien LASSERRE Date: Tue, 17 May 2011 09:39:51 +0000 Subject: [PATCH] --- application/controllers/IdentiteController.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/application/controllers/IdentiteController.php b/application/controllers/IdentiteController.php index 147cd2980..9c1267681 100644 --- a/application/controllers/IdentiteController.php +++ b/application/controllers/IdentiteController.php @@ -235,4 +235,18 @@ class IdentiteController extends Zend_Controller_Action $this->view->assign('evens', $evens); } + public function newsAction() + { + $session = new SessionEntreprise($this->siret, $this->id, true); + + $url = 'http://news.google.fr/news?hl=fr&ned=fr&q='. + urlencode('peugeot').'&output=rss'; + + require_once ('magpierss-0.72/rss_fetch.inc'); + $rss = fetch_rss($url); + $items = array_slice($rss->items, 0, 5); + + $this->view->assign('items', $items); + } + } \ No newline at end of file