March 5, 2005

RSS Feeds!

RSS feeds, popularly known to stand for “Really Simple Syndication,” is an XML format specification designed to share news headlines and other web content between websites.

Almost all popular news websites (like Yahoo) and blogs (like Slashdot) have RSS feeds which can be subscribed to by readers. Essentially, subscribing to these feeds allows the user to read new and updated content from any number of these websites at a single place, without having to navigate to each site. Hence it’s a kind of "content aggregator" function. Think of it as the “what’s new” portion of web content you're interested in, being delivered to your doorstep.

Posted by kilam002 at 12:49 AM

March 4, 2005

How RSS works -- harvesting content from other blogs and web sites

As an example, consider the web site Yahoo News. They publish an RSS feed. This is essentially an XML format text file which contains static and dynamic information about your website. The feed is either in RSS 1.0 , 2.0 or Atom format, and consists of lists of items. In the Yahoo News feed, each item is a news story with the following tags: title, link and description.

A sample Movable Type RSS feed

This file can be created using a scripting language like Perl. Once this feed is in place, for example on the Yahoo News site, anyone can subscribe to the content on that site by making use of this file, either using a content "aggregator" (e.g., Bloglines), or by including a script on one's own web site. The script that you write parses and then displays the content of the feed on your website where you want it displayed.

If you want to subscribe to many blogs and news feeds, the simplest way is to use a content aggregator like Bloglines. Register at the website and provide the link to the RSS feeds of the sites you want to subscribe to. You'll then be able to read all the content from these RSS feeds on your account at the Bloglines web site.

If you want to post content from other blogs or RSS feed sources onto your own blog...

Posted by kilam002 at 12:52 AM

March 3, 2005

Posting RSS Content to Your Blog

1. Download the RSS parser
2. Parse the RSS feed and store in a local object
3. Display the feed on your website

In UThink, look for the small link saying “Syndicate this Site (XML)” at the bottom of the sidebar in your blog page. This is the link to the RSS feed itself. All blogs on Movable Type have by default this RSS feed file already created and ready to use.

Step 1

Most parsers are written in scripting languages such as Javascript, Perl and PHP.
UTHINK uses lastRSS which is a php script. Download it to your webserver.

Step 2

You need to write a small script like this one.
Include this script at the beginning of your main index file.
You may need to modify the file extension to .phtml to recognize PHP. This acts as a header file, parses the RSS feed and stores in a local object.

Step 3

Now we are ready to display the actual information. This involves writing another script to access the necessary objects. This script may be included wherever you want on your blog page. Usually a good place is the sidebar.

Here's an example.

Posted by kilam002 at 1:01 AM

February 27, 2005

Sample RDF feed


<?xml version="1.0" encoding="iso-8859-1"?>

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:cc="http://web.resource.org/cc/"
xmlns="http://purl.org/rss/1.0/">

<channel rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/">
<title>UMN: Bio-Med Library - Public Health</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/</link>
<description>Information and Resources: Chad Fennell - Public Health Liaison</description>
<dc:language>en-us</dc:language>
<dc:creator></dc:creator>
<dc:date>2005-04-27T13:41:28-06:00</dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=2.661-umnlib" />


<items>
<rdf:Seq><rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/020586.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/020408.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/020245.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/020244.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/020243.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/020242.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/020241.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/019976.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/019975.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/019643.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/019642.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/019641.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/019006.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/018867.html" />
<rdf:li rdf:resource="http://blog.lib.umn.edu/gruwell/publichealthliaison/018809.html" />
</rdf:Seq>
</items>

</channel>

<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/020586.html">
<title>Industry Surveys: Standard & Poors NetAdvantage</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/020586.html</link>
<description>Looking for Data on healthcare facilities, managed care, pharmaceuticals or products and supplies? Take a few minutes to look at Standard & Poor's NetAdvantage. After visiting this site, click on the "Industries" tab and choose from among the numerous market...</description>
<dc:subject>Research Tips</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-27T13:41:28-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/020408.html">
<title>Government Issues 12 New Food Pyramids</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/020408.html</link>
<description>WASHINGTON - The government flipped the 13-year-old food pyramid on its side Tuesday, added a staircase for exercise and offered a dozen different models, all aimed at helping Americans trim their waistlines. Dubbed "MyPyramid," the new graphic interprets the food...</description>
<dc:subject>Health Services and Research Policy</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-25T09:51:11-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/020245.html">
<title>FSIS Issues Public Health Alert For Minnesota and Michigan - Salmonella Cases Linked to Frozen Chicken Entrees</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/020245.html</link>
<description>Congressional and Public Affairs (202) 720-9113 Steven Cohen WASHINGTON, April 20, 2005 - The U.S. Department of Agriculture's Food Safety and Inspection Service (FSIS) isssuing a public health alert to remind consumers to ensure that frozen meat and poultry products...</description>
<dc:subject>Epidemiology</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-21T18:19:12-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/020244.html">
<title>FDA Asking for Public Comment on Food Label Changes</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/020244.html</link>
<description> The Food and Drug Administration (FDA) today asked for public comment on two proposals to improve the appearance and content of the nutrition label to help consumers make better-informed weight management decisions. The proposals focus on providing practical serving...</description>
<dc:subject>Health Services and Research Policy</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-21T18:16:56-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/020243.html">
<title>Public Health Critical Care List: Fiscal Year 2006</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/020243.html</link>
<description>After decades of under-investment, our public health system lacks the resources it needs to tackle the full range of health threats -- from preparing for potential chemical or biological attacks, to addressing the serious chronic disease epidemics of cancer or...</description>
<dc:subject>Epidemiology</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-21T18:15:37-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/020242.html">
<title>Flu vaccine forecast raises several possible outcomes</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/020242.html</link>
<description>Washington -- Three vaccine scenarios are being eyed by the Centers for Disease Control and Prevention for the upcoming flu season: rain, shine or hurricane. A "rainy" scenario, the one the agency considers realistic, would mimic last season's scattered storms...</description>
<dc:subject>Epidemiology</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-21T18:14:09-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/020241.html">
<title>

NEWS

TODAY’S CANCER CENTER SEMINAR

There is no seminar scheduled due to the AACR meeting.

A peek at next week’s seminar:

Targeting tumors with genetically enhanced T lymphocytes

Michel Sadelain, M.D., Ph.D., Immunology Program , Memo</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/020241.html</link>
<description> Sponsor: Jose Carreras International Leukemia Foundation (FJCILF) Deadline: October 15, 2005 Internal coordination required. Only one application will be considered from each institution. The José Carreras International Leukemia Foundation was founded in 1988 by the internationally known tenor Jose...</description>
<dc:subject>Grants</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-21T18:12:32-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/019976.html">
<title>Antibody Promising Against Variety of Cancers</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/019976.html</link>
<description>MONDAY, April 18 (HealthDay News) -- An antibody called Sphingomab shows promise in treating some of the most deadly kinds of tumors, according to studies presented Monday at the annual meeting of the American Association for Cancer Research in Anaheim,...</description>
<dc:subject>Epidemiology</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-18T15:55:23-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/019975.html">
<title>New Hand-held Information System for Emergency Responders</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/019975.html</link>
<description>(Bethesda, Md.)--The National Library of Medicine (NLM), a component of the National Institutes of Health, has announced the release of a PDA software tool designed to help first responders when they arrive at a hazardous material (Hazmat) incident, such as...</description>
<dc:subject>Environmental and Occupational Health</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-18T15:53:47-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/019643.html">
<title>Bioinformatics: Building Bridges</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/019643.html</link>
<description>The fourth annual symposium, now two days long, supports the field of bioinformatics and its UM Graduate Program.It includes tutorials, world-renowned speakers, a poster session, exhibits, demonstrations, and a lunch hosted by the Bioinformatics Graduate Faculty. All events are free....</description>
<dc:subject>Bio-Statistics</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-13T09:34:29-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/019642.html">
<title>Bioinformatics: Building Bridges</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/019642.html</link>
<description>The fourth annual symposium, now two days long, supports the field of bioinformatics and its UM Graduate Program.It includes tutorials, world-renowned speakers, a poster session, exhibits, demonstrations, and a lunch hosted by the Bioinformatics Graduate Faculty. All events are free....</description>
<dc:subject>Bio-Statistics</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-13T09:34:08-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/019641.html">
<title>University of Pittsburgh gets wired for speed with Apple Xserve G5 cluster</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/019641.html</link>
<description>Every week on CBS's hit series Numb3rs, an FBI agent relies on his math genius brother to find patterns that help to solve crimes. With its new Apple Xserve G5 computing cluster, the University of Pittsburgh's Graduate School of Public...</description>
<dc:subject>Bio-Statistics</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-13T09:19:49-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/019006.html">
<title>NCI Fellowship Opportunities</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/019006.html</link>
<description>Did you know... NCI was recently ranked in the Top Ten "Best Places for Postdocs" in an international survey NCI maintains a secure resume databank of applicants for available or future positions, including postdoctoral fellows. Our Investigators are able to...</description>
<dc:subject>Misc.</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-04T09:28:26-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/018867.html">
<title>2005 Public Health Institute - May 23 - June 10, 2005</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/018867.html</link>
<description>About The Institute The Public Health Institute, offered through the University of Minnesota School of Public Health, provides professionals a unique opportunity to immerse themselves in a chosen field of study for a single course or for the entire three...</description>
<dc:subject>Events</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-04-01T10:18:34-06:00</dc:date>
</item>
<item rdf:about="http://blog.lib.umn.edu/gruwell/publichealthliaison/018809.html">
<title>Cultural and social factors influence prostate cancer treatment</title>
<link>http://blog.lib.umn.edu/gruwell/publichealthliaison/018809.html</link>
<description>Researchers say social and cultural factors play a significant role in patients' prostate cancer treatment decisions. A new study published in the May 1, 2005 issue of CANCER (http://www.interscience.wiley.com/cancer-newsroom), a peer-reviewed journal of the American Cancer Society, finds non-medical variables,...</description>
<dc:subject>Health Services and Research Policy</dc:subject>
<dc:creator>fenne035</dc:creator>
<dc:date>2005-03-31T16:04:26-06:00</dc:date>
</item>


</rdf:RDF>

Posted by kilam002 at 3:59 PM

February 26, 2005

Script header


<?php
// include lastRSS library
include './lastRSS.php';

// create lastRSS object
$rss = new lastRSS;

// setup transparent cache
$rss->cache_dir = './cache';
$rss->cache_time = 3600; // one hour

?>

Posted by kilam002 at 4:06 PM

February 25, 2005

Displaying script


<?php
// Try to load and parse RSS file
if ($rs = $rss->get('http://blog.lib.umn.edu/staff/magrath/index.rdf')) {
// Show website logo (if presented)
if ($rs[image_url] != '') {
echo "<A href=\"$rs[image_link]\"><img src=\"$rs[image_url]\" alt=\"$rs[image_title]\" vspace=\"1\" border=\"0\" /></A><br />\n";
}
// Show clickable website title
echo "<center><A href=\"$rs[link]\">$rs[title]</A></center>";
// Show website description
echo "$rs[description]<br />\n";
// Show last published articles (title, link, description)

echo "< UL >\n";
$num = 1;
foreach($rs['items'] as $item) {
if ($num <= 10) {
echo "\t<li><A href=\"$item[link]\">".$item['title']."</A><br />".$item['description']."</li>\n";
$num++;
}
}
//echo "< /UL >\n";
}
else {
//echo "Error: It's not possible to reach RSS file...\n";
}

?>

Posted by kilam002 at 4:09 PM