Grouper: RSS manager, XML converter, website scraper
Web This Site

Grouper - Documentation


Getting Started: Free Download | Purchase | Install
Reference: Functions | Plugins | Themes
Etc.: Configure | Affiliates

Search Settings

Use the function "GrouperSourceConf" to set the options listed on this page.

Search option support: (click the option name for details)
Option Google News Yahoo! News Feedster Daypop
language Yes Yes Yes
edition Yes
encoding-in['request']*1 Yes? Yes Yes
sortby Yes Yes
sortby Yes
sourcetypes Yes
encoding*2 Yes? Yes Yes

*1 Grouper versions 1.6.2 and higher only. Use the function GrouperConf to set this option like this: GrouperConf('request','UTF-8','encoding-in');
*2 Grouper versions 1.6.1 and lower only.

language
The language code for the search. To find valid language codes, please search the site from which the feed is coming in the desired language. Then look in the URL shown in your browser and find the language code.

Example: (search for French language news)
<?php
require_once '/YOUR/PATH/TO/grouper/grouper.php';
GrouperSourceConf('language','fr');
GrouperShow('cuisine');
?>


edition
The edition code for the search. Often, changing the edition code appears to have little or no effect on the search results, so it's purpose is not entirely clear. It appears to be related to countries or regions. The edition code appears as "ned=<edition code>" in the URL when you search Google News.

Example: (search the UK edition)
<?php
require_once '/YOUR/PATH/TO/grouper/grouper.php';
GrouperSourceConf('edition','uk');
GrouperShow('cuisine');
?>


encoding-in['request']
Use the function GrouperConf to set this option as shown below
Specify the desired character encoding of the RSS feed. A few example values are "UTF-8", "ISO-8859-1", etc. NOTE: Google News appears to ignore this setting, even though it sometimes appears in the search query strings that they themselves generate. We recommend setting it anyway, just in case they do begin honoring it at some point.

Example: (get the feed encoded in UTF-8)
<?php
require_once '/YOUR/PATH/TO/grouper/grouper.php';
GrouperConf('request','UTF-8','encoding-in');
GrouperShow('cuisine');
?>


sortby, sortby1 and sortby2
For Google News and Yahoo! News, sortby1 and sortby2 are extra code which is add to the search query to control the sort order. To sort by relevance to the search terms, nothing is added (sortby1 is empty). To sort strictly by date, some extra code is added (sortby2 contains that code). If you wish to sort by date, change sortby to 2. You probably won't need to modify sortby1 orsortby2.

Example: (sort by date)
<?php
require_once '/YOUR/PATH/TO/grouper/grouper.php';
GrouperSourceConf('sortby',2);
GrouperShow('cuisine');
?>


sortby
The value of sortby for Feedster is different from the value for Google News and Yahoo! News. For Feedster, it contains a word describing the sort order. Valid values are "relevance", "date" and "blogrank".

Example: (search by blogrank)
<?php
require_once '/YOUR/PATH/TO/grouper/grouper.php';
GrouperConf('source','feedster'); GrouperSourceConf('sortby','blogrank');
GrouperShow('cuisine');
?>


sourcetypes
Specifies what types of news sources to search. Valid values are: a (all), n (news), w (weblogs) and h (rss headlines).

Example: (search weblogs only)
<?php
require_once '/YOUR/PATH/TO/grouper/grouper.php';
GrouperConf('source','daypop'); GrouperSourceConf('sourcetypes','w');
GrouperShow('cuisine');
?>


encoding
This option was removed from version 1.6.2
Specify the character encoding of the RSS feed. A few example values are "UTF-8", "ISO-8859-1", etc. NOTE: Google News appears to ignore this setting, even though it sometimes appears in the search query strings that they themselves generate. We recommend setting it anyway, just in case they do begin honoring it at some point.

Example: (get the feed encoded in UTF-8)
<?php
require_once '/YOUR/PATH/TO/grouper/grouper.php';
GrouperSourceConf('encoding','UTF-8');
GrouperShow('cuisine');
?>