CHAPTER 20 WEB SERVICES Aggregating Feeds Of (Web hosting script)
CHAPTER 20 WEB SERVICES Aggregating Feeds Of course, chances are you re going to want to aggregate multiple feeds and devise some means for viewing them simultaneously. To do so, you can simply modify Listing 20-2, passing in an array of feeds. A bit of CSS may also be added to shrink the space required for output. Listing 20-3 shows the rendered version. Listing 20-3. Aggregating Multiple Feeds with Magpie channel[’title’]; echo “
$feedTitle
“; foreach ($rss->items as $item) { $link = $item[’link’]; $title = $item[’title’]; $description = isset($item[’description’]) ? $item[’description’]. “
” : “”; echo “$title
$description”; } echo “
“; } ?> Figure 20-3 depicts the output based on these three feeds.
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.