Simple default use of Grouper
This example simply uses Grouper to search a term on Google News. No cache file will be set.
Grouper’s default mode uses Google News, so there are no other settings other than the search terms.
<?php
require_once ‘homedir/rootdir/grouper/grouper.php’;
GrouperShow(”fishing”);
?>
The require_once line points to the installed location of Grouper. This line calls Grouper.
GrouperShow is a Grouper command that goes out and finds the search results, creates the feed, and then displays the feed.
Create a php document. Call it test.php. Paste the above code into the test.php document.
Upload test.php to the web server. Call test.php from a browser. ie (www.yoursite.com/test.php or www.yoursite.com/dir/test.php)
In IE, the xml structure should appear in the browser window. Within Firefox, an open dialog will commence. Opening the document in wordpad will display the xml document for the feed.
This will successfully create a feed based off Google News for the search terms entered.
Want to add this feed to an RSS Reader?
Simply add www.yoursite.com/test.php to the Reader. Think of the test.php file as the actual feed.






[...] The first example simple uses Grouper in default mode. Grouper uses Google News by default. [...]
July 15th, 2005 at 1:35 pm[...] The search terms have double quotes around them to perform an exact phrase search. See my post on the simple default use of Grouper for more information on accessing the generated feed. [...]
July 29th, 2005 at 3:48 pm