LastRss - How to parse the image from this xml feed ?
Posted: Mon Sep 22, 2008 7:46 am
Hi
i need you help ,
am using lastrss parser and with the following part of code am parsing an xml feed from the web (rss url: http://www.weatherforecastmap.com/unite ... on/rss.xml) ,
all is ok with parsing just i can not understand how we can parse also the images from the feed ..?
parsing the text is allright just i cannot parse the image
What i have to change in order to parse also the image from the current xml rss feed ..?
thank ya in advance
i need you help ,
am using lastrss parser and with the following part of code am parsing an xml feed from the web (rss url: http://www.weatherforecastmap.com/unite ... on/rss.xml) ,
all is ok with parsing just i can not understand how we can parse also the images from the feed ..?
parsing the text is allright just i cannot parse the image
Code: Select all
<?php
// On inclue lastRSS.php
include './lastRSS.php';
// Options de base
$url_flux_rss = 'http://www.weatherforecastmap.com/united_kingdom/london/rss.xml';
$limite = 10; // nombre d'actus à afficher
// on crée un objet lastRSS
$rss = new lastRSS;
// options lastRSS
$rss->cache_dir = './cache'; // dossier pour le cache
$rss->cache_time = 3600; // fréquence de mise à jour du cache (en secondes)
$rss->date_format = 'd/m'; // format de la date (voir fonction date() pour syntaxe)
$rss->CDATA = 'content'; // on retire les tags CDATA en conservant leur contenu
// lecture du flux
if ($rs = $rss->get($url_flux_rss))
{
for($i=0;$i<$limite;$i++)
{
// affichage de chaque actu
echo '<strong>'.$rs['items'][$i]['pubDate'].'</strong> · <a href="'.$rs['items'][$i]['link'].'">'.$rs['items'][$i]['title'].'</a><br />';
}
}
else
{
die ('Flux RSS non trouvé');
}
?>thank ya in advance