call image to feed rss
-
Hi,
I must print with the Feed wordpress the topics of my blog in homepage (external page).
I use this script that put information from Feed wordpress on my blog.<?php require_once('magpierss/rss_fetch.inc'); //Questo è l'URL del feed che andremo a parsare. Nell'esempio c'è il mio :-) $url = "http://www.blabla.ext/blog/category/convegni/feed"; //apre il feed $rss = fetch_rss ($url); //Metto il titolo del feed in una variabile $feedchanneltitle = $rss->channel['title']; //Incominciamo un ciclo per ogni item foreach ($rss->items as $item) { //Qui potrei mettere dei controlli: se le variabili non sono vuote, ecc // if(!empty($item['description'])) { //Variabilizzo tutto $itemlink = $item['link']; $itemtitle = $item['title']; $pubdate = $item['pubdate']; $description = $item['description']; $author = $item['author']; $feedurl = $dato['feedurl'] ; //Formatto la data con un intero UNIX TIMESTAMP (del tipo 1129218794) per poterla maneggiare $pubdate = strtotime ($pubdate); //Formatto la stringa della data secondo i miei gusti $pubdate = date("D, d F Y, G.i", $pubdate); // } //chiudo eventuali controlli con IF //Ora potrei cominciare a stampare il feed a video echo '<hr/>'; echo '<a href="'.$itemlink.'">'.$itemtitle.'</a>', ' Data:'.$pubdate.''; //Strip_tags è aggiunto per evitare di mostrare l'HTML eventualmente contenuto nell'articolo echo '<p>'.$description.'</p>'; } // chiudo il ciclo FOREACH ITEM ?>well works!, but if a topic is present an image it is not called and printed from the script. What is the item of image?
thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘call image to feed rss’ is closed to new replies.