1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
<?php
$file = "http://www.facebook.com/feeds/page.php?format=atom10&id=12657675834";
include 'Zend/Feed.php' ;
try{
$flux = Zend_Feed::import($file);
} catch(Zend_Feed_Exception $e) {
echo $e->getLine().$e->getMessage()."<br />" ;
exit;
}
// contenu non exhaustif du flux
$content = array (
'title'=> $flux->title(),
'link'=> $flux->link(),
'description'=> $flux->description(),
'update'=> $flux->update(),
'icon'=> $flux->icon(),
'logo'=> $flux->logo(),
'entry'=> array()
);
// contenu non exhaustif de chaque entrée
foreach ($flux as $elem) {
$content['entry'][] = array(
'title' => $elem->title(),
'link' => $elem->link(),
'published'=> $elem->published(),
'updated'=> $elem->update(),
'author'=> $elem->author->name(),
'content' => $elem->content()
);
}
var_dump($content) ;
?> |
Partager