Feeds

What sites on the web do you visit regularly? Probably ones with frequently changing content such as...

To return to these regularly, you might bookmark the sites, or subscribe to an e-mail newsletter that keeps you informed of the latest stories. But many sites now make this task of finding out the latest content easier by publishing a...

Web feed: Usually an XML document in a standard format (often RSS--a 'dialect' of XML) that lists links of recently updated content, and offers short descriptions (or sometimes the whole story) of the new content.

RSS feeds are available via the web, often when you see this graphic: xml graphic or feed icon. Recent browsers (FireFox, IE 7, Safari) will render something sensible if you browse directly to the URL of the feed. Here are some sample feeds:

Feed readers: Software that lets you look through all your 'feeds' at one swat. This includes...

Creating a feed

It's possible to create your own RSS feed. Just copy an existing RSS document, and replace with URLs, descriptions, and such that apply to your content. SearchEngineWatch shows you how.

Most blogging systems will automatically generate an RSS feed for you. For example, with the GCBlogs, the xml feed is always made available by tacking "/xml" onto the blog URL. E.g. The Men's Chorus Tour blog site is at www.goshen.edu/b/l/menschorus07, and the corresponding XML feed is at www.goshen.edu/b/l/menschorus07/xml

Caravel has tools to let you manually create an RSS feed.

Flickr and del.icio.us will make your latest entries available as feeds.

Making your feed available

Display the feed icon

You can display the feed icon feed icon on your page and link it to the the URL of your feed.

Go to feedicons.com to get a high quality icon of your very own.

Let your visitors know about your feed

With this code in your page:

<link rel="alternate" type="application/rss+xml"
title="GC Sports"
href="http://www.goleafs.net/gcsports.xml" />

Recent browsers (since IE 7.0, Safari, FireFox...) will display a feed icon for you in a standard location to tip people off that there's a feed they can subscribe to.

feed icon

Display an RSS feed on your web page

Newspapers fill column inches with "syndicated" content from wire services, and you can do similar things using RSS.

RSS headlines

Using php to display the contents of a feed is a three-step process.

  1. First locate a feed, such as the NYT movies feed,
  2. Next you'll need a script to convert the RSS feed to HTML, such as rssd which we call as follows:
         http://www.goshen.edu/cgi-bin/rssd?src=[put your feed URL here]
    Here's the HTML from our 'movies' feed generated by rssd.

  3. And finally you do a php 'include' to show the HTML on your page as we will now do here...

Feed-o-rama!

Using the Magpie RSS php library, you can have complete control over formatting any aspect of a feed

GC Comment App

What a php page needs to 'include' to be able to add/show comments from others at GC:

<?
$stylesheet="/communication/326/_i/comments.css"; // replace with yours
include "/home/httpd/html/cment/comments.h";
?>

Flickr photo feed

An experiment...

Latest 2 images tagged 'jamaica' from paulmr's flickr photo feed

This was generated with three lines of PHP code:

<h5>Latest 2 images tagged 'jamaica' from paulmr's flickr photo feed</h5>
<?
include "http://api.flickr.com/services/feeds/photos_public.gne?id=89084260@N00\
&format=php&tags=jamaica";

print $feed['items'][0]['description'];
print $feed['items'][1]['description'];
?>

Using a Google Gadget

Another way of putting syndicated content on your web page is to use a Google Gadget such as the slim RSS reader. Find a gadget. Configure it (with the URL of your feed) and Google will show you the code to put in your web page. Here's the result using our NYT movies feed:

It's probably easier to configure the Google Gadget, however, you're stuck with the Google "chrome".

Other Google Gadgets

Other Google gadgets include things to let visitors find driving directions to your location, and display a calendar feed.

iCal

Another prominent type of feed is iCal used by calendaring software to make calendar-style information available.

ICal-aware calendar programs can "subscribe" to an iCal feed and so, automatically update calendar information when the calendar publisher updates the info.