How can I display the RSS images with magpierss? I have looked around online but cant find any resources about displaying RSS images... does magpierss has this function to display images? If it does not, any other solutions?
Here is my code, but the $image obviously doesnt work.
Many thanks,PHP Code:<?php
require_once 'magpierss/rss_fetch.inc';
$url = 'http://globaltolerance.com/?feed=rss2';
$rss = fetch_rss($url);
$items = array_slice($rss->items, $startRow, 3);
foreach ($items as $item) {
$title = $item['title'];
$url = $item['link'];
$image = $item['image'];
$date = $item['date_timestamp'];
$desc = $item['description'];
if (strlen($title) >= 25)
{
$title = substr($title,0,24)."...";
}
if (strlen($desc) >= 25)
{
$desc = substr($desc,0,24)."...";
}
?>
<!--item-->
<div class="item">
<!--item_left-->
<div class="item_left">
<a href="#"><?php echo $image;?></a>
</div>
<!--item_left-->
<!--item_right-->
<div class="item_right">
<div class="title"><a href="<?php echo $url;?>"><?php echo $title;?></a></div>
<div class="desicription"><?php echo $desc;?></div>
<div class="date"><?php echo date("l, F jS, Y", $date);?></div>
</div>
<!--item_right-->
</div>
<!--item-->
<?php
}
?>
Lau







Bookmarks