Grouper: Convert news searches and other web pages to RSS newsfeeds

Grouper: RSS Generator - Documentation

     Version 1.4.3 (7/15/2005)

This documentation has been replaced. The new documentation is available here.

Download | Install | Configure | Functions | Grouper Evolution Plugins | Atom Example | News Example | Associates Program

Example Code: Convert news search results to RSS

Grouper is a powerful tool for creating news radars--"constantly updated thematic channel[s] of highly relevant web references that are gathered in accordance with specific, persistent search criteria"[1]. This page shows how to generate an RSS feed from a news search, to which you can subscribe in your RSS reader to keep up on the latest news about a particular topic.

The following code demonstrates the simplest way to convert the results of a news search to an RSS feed. The following, plus any additional configuration, should be the entire contents of the file. Change "SEARCH TERMS" to the terms you wish to search for, and "PATH/TO/GROUPER" to the path to your Grouper installation.

<?php
$searchterms='SEARCH TERMS';
require_once '/PATH/TO/GROUPER/grouper.php';

// add any desired configuration here, or use the default settings

GrouperShow($searchterms,md5($searchterms));
?>


By default, the news source is Google News™[2]. You may select other sources by setting the "source" configuration variable. For example, selecting Yahoo! News&trade[2]; requires one additional line of code, as follows:

<?php
$searchterms='SEARCH TERMS';
require_once '/PATH/TO/GROUPER/grouper.php';

// add any desired configuration here, or use the default settings
GrouperConf('source','yahoo');

GrouperShow($searchterms,md5($searchterms));
?>


In both examples above, the code "md5($searchterms)" automatically generates a cache file name based on the search terms.


"Google", "Yahoo!" and "Feedster" are trademarks of their respective owners. Grouper is not endorsed by these companies, and Gecko Tribe, LLC is not affiliated with them in any way.

[1] http://www.masternewmedia.org/news/2005/03/04/how_to_create_news_radars.htm

[2] Your use of search results is governed by the terms of service of the search engine. Please consult their terms of service if you have any question about whether a particular use is allowed.