website view scripts/get_feed.php @ rev 743

Tiny edits
author Paul Issott <paul@slitaz.org>
date Sat Jan 15 16:22:24 2011 +0000 (2011-01-15)
parents
children
line source
1 <?php
3 // Read Feed
4 function get_feed($feed_url) {
5 $content = file_get_contents($feed_url);
6 $x = new SimpleXmlElement($content);
7 echo "<ul>";
8 foreach($x->channel->item as $entry) {
9 echo "
10 <li>
11 <strong><a href='$entry->link'
12 title='$entry->title'>" . $entry->title . "</a></strong>
13 <p>$entry->description</p>
14 </li>";
15 }
16 echo "</ul>";
17 }
19 ?>