Featured feeds
Syndication Viewer
Google combined feeds
RSS combined feeds
Business and Investing feeds
Blogging combined feeds
Research and Internet combined feeds
Lifestyle combined feeds
News combined feeds


Syndication Viewer instructions
Submit your feed
Add a feed to your site


Google feed selection
RSS feed selection
Business and Investing feed selection
Amazon feed selection
Blogging feed selection
Research and Internet feed selection
Lifestyle feed selection
News feed selection
Adult feeds


Harold Davis Blog main page
Building Research Tools with Google


Googol FAQ
Googolplex FAQ


Edward Kasner FAQ
Milton Sirotta FAQ


Google home page
Google according to Google
Everything Google
The Unofficial Google Weblog
Google intitle not inurl
(Explanation)


RSS FAQ
Atom FAQ
Harold Davis Blog RSS feed
Harold Davis Blog Atom feed


Braintique sponsored blogs page
About the Googleplex Blog


Recent Harold Davis blog topics:

Spam Bites Man
Upgrading MovableType
Building Traffic and Making Money
Berkeley Hills Weblog Makeover 94707
Search Engine Optimization
Help! I've been Flickrwhacked!
May the Great eBay, Google, Microsoft, Yahoo! Games Begin!
Buh-Bye: Ranting and Raving about Voice Response
Easy Travel to Mars
How Is a Honda Element Like a Platypus?
Private Wikis As Knowledge Management Systems
The Commune and the Scholar
As the Manichean Google Worm Turns
Power Tends to Corrupt and Google Power Corrupts Abso-Googly
Buyer Beware, Indeed!


Our Web host:
IX WebHosting



Your Ad Here

From Poetry to Technology

Please visit our sponsor Braintique.com for premium information about a myriad of topics.

I've never regarded poetry and technology as opposites. On the contrary, I think that well-engineered technology shares many of characteristics with good poetics: it is sparse, elegant, often fun. If you have cracked the code and are one of the relatively few that understands a bit of cool code, or a new direction in technology, then it is the same kind of "aha" moment as when you really feel what a poem means.

I've approached the overlap of technology and poetics in a number of ways. For example, my Mechanista site celebrates machines of grace and beauty from the early days of the information age (primarily calculation devices and typewriters).

This Googleplex Blog site is a reflection of the techno-poetic obsession of mine in two different aspects:

Case Study: Web display of a syndicated feed


It's easy to read an RSS (RSS is short for "Really Simple Syndication") feed in an RSS viewer that is integrated with a Web browser, part of your email program, or a standalone program. You can find out more about this software in our RSS FAQ.

It's also pretty easy to generate RSS syndiaction feeds if you are a blogger. Blogging software such as MoveableType does this for you automatically. You can also get standalone software that helps you compose and generate RSS feeds. Once again, you can find out more about this software in our RSS FAQ.

However, there's no canned or absolutely easy way to display syndicated feed on your web sites (at least that I know of). As I describe in this section, the process of adding an RSS feed to a Web site requires some custom Web programming.

Before I go there, let me step back for a second and explain why the topic of viewing RSS feeds is important (if you don't already know). Blogging is probably to the Web today what Usenet was ten years ago. The ability to produce a simple syndicated feed based on blog entries that can be subscribed to, and unsubscribed to, almost certainly takes the place of email listservices -- for one thing, syndicated feeds are more flexible and granular. You can read them where you want (browser or email, or with my RSS Web viewer, on the Web), and you can easily control which entries you bother with. So this is a great technology, and an important part of the direction the Internet is moving in.

The RSS feed itself is simply an XML file that meets certain other requirements. See the RSS FAQ for details.

Like many things in life, the devil is, in fact, in the details, and the details here are that there are some RSS variations. The major variations are RSS 1.0 and RSS 2.0, but there are also minor variations -- as well as the fact that some feeds include fields named one way, and others name it another way. This is only really a problem if you are trying to display multiple feeds with one set of code, as in the RSS Viewer application. With a single feed, you can just adapt your code to however it names things without worrying about lots of cases.

So, back to my case study: to see how to display RSS on a Web page, I decided to use the feed generated by my blog at http://www.braintique.com/research/mt/index.xml on this site. You'll see an example of this generation in the Recent Topis links on the left-hand navigation bar.

As with most Web development, one of the first questions is what technology you have available on your Web server. In my case, programming with PHP seemed far and away the best bet (considering what our Web host had pre-installed).

In overview, there are three steps:
  1. Fetch the URL for the RSS feed
  2. Parse it
  3. Render it in HTML
Programmatically, none of these tasks are very onerous. To make it easier, I used a PHP library named MagpieRSS, which is specially designed for fetching and parsing RSS feeds in PHP. Here's a good overview article about using MagpieRSS and PHP to display an RSS feed.

You can download the PHP code snippet used on the left to display the recent topic links.

Essentially, the RSS feed starts with some header information (such as the name of the feed). Then the items in the feed are listed (title, link, initial words, publication date, and so on). All this is in XML. MagpieRSS (which consists of four, short library functions also written in PHP) converts these items into an array. (By all means have a look at the MagpieRSS source code if you go down this road.)

You can cycle through all the elements in the items array, displaying the attributes of each that you are interested in (in the recent topic list, just the title and link). You can intersperse whatever HTML elements you need for your display within your PHP code that does this.

Case Study: The Web RSS Viewer


To start with, the RSS Viewer application faces the same initial challenge as the display of recent topic links. I met the challenge in the same way, although of course I needed to display somewhat different information: the full RSS feed info includes the initial text of the item. (The length of this text varies and is specified by RSS generation tool used and/or the user of the RSS generation tool.)

Besides the issue of different display of item information, there were some other wrinkles:
  • The user selects the RSS feed to display from a list (or manually enters a feed): this means the PHP script needs to detect which feed the user chose.
  • Different feeds differ in the details of how they name fields (and which fields they choose to include)
You can download the HTML page containing the form and PHP code for displaying different RSS feeds and have a look for yourself at how I managed these things (V2 now upgraded to allow multiple feed selection).

Letting the user choose an RSS feed

Here, the trick is to use an HTML form to allow the user to select a feed (or enter one manually). The HTML form uses an HTTP GET to call the HTML page that contains the form. The PHP code is conditional: if the varaible containing the feed is null, then the HTML form is displayed. On the other hand, if the feed has a value, then it is processed and displayed.

Dealing with RSS feed differences

There's no magic bullet for dealing with this one. You simply have to test the feeds you want to display, and see what doesn't come through right. If there are problems, you can inspect the XML of the actual feed to determine the cause. You can then use conditionals to deal with variants of the way important fields are named.

What did he say in that blog, anyway?


Did I say, "From poetry to technology?" I should have said, "From technology to poetry..." or at least to something interesting.

I use my blog, like I use all my writing, as an excuse for investigating things that interest me. One example is the whole issue of displaying RSS feeds on the Web and writing the plumbing in PHP to make them work.

Of course, I'm pretty significantly interested in the themes of research, Google, finding information, and the direction of the Web. I've always been interested in these things, and writing Building Research Tools with Google For Dummies just kicked it up a notch.

But I can't stay narrowly focused, and I don't want to. I will comment in my blog on larger issues of what is going on around me. Here are some examples: I don't promise to not offend you, but I do promise to express my honest opinions with some degree of humor and pizazz.

I have made a conscious decision not to open the Googleplex Blog to comments: because it is my blog, and I need to do it my way. But I am delighted to hear from you. Braintique.com in part sponsors the Googleplex blog; you can use the Braintique contact form to let me know what you think about anything, and if you disagree or have comments about what I have written. Thanks for your interest.

Harold Davis


Google






The Googleplex Blog is not afilliated with Google the company and is solely an expression of the opinions and interests of Harold Davis. © Harold Davis 2005. All rights reserved.

I'm using an image of the Webb adder as a graphic to represent a very large number!