| Subject: Re: Combine Yahoo AND Google News onto page? Carp & Grouper |
Author:
Antone
|
[
Next Thread |
Previous Thread |
Next Message |
Previous Message
]
Date Posted: 12:23:57 06/01/05 Wed
Author Host/IP: 67.169.250.63 In reply to:
blogMan
's message, "Combine Yahoo AND Google News onto page? Carp & Grouper" on 06:07:33 05/19/05 Thu
The following is part of the response I sent to "blogMan" by email last month--I'm posting it here in case others might find it useful:
Next, how to get Yahoo! News. To do that, after the "include_once" line for Grouper, add this:
GrouperConf('source','yahoo');
Third, if you want to aggregate Google and Yahoo results together, here's how to do it (the paths in the following code would of course need to be adjusted to match your installation):
include_once "/path/to/grouper/grouper.php";
GrouperShow('your search terms','google_results.rss',0);
GrouperConf('source','yahoo');
GrouperShow('your search terms','yahoo_results.rss',0);
include_once "/path/to/carp/carp.php";
// do display formatting here, before calling CarpFilter
CarpFilter('/path/to/grouper/rsscache/google_results.rss','google');
CarpFilter('/path/to/grouper/rsscache/yahoo_results.rss','yahoo');
CarpAggregate('google|yahoo');
By the way, when you're using CaRP to display Grouper's output, since CaRP's input file will be stored on your server's hard drive, you can use the function CarpShow instead of CarpCacheShow, which just skips the step of caching CaRP's input (which would result in two copies of exactly the same file). Also, if you make a configuration change and you need to get rid of a cache file based on the old configuration, just add this line of code, which will cause the cache file to expire immediately:
CarpConf('cacheinterval',0);
or for Grouper's cache:
GrouperConf('cacheinterval',0);
[
Next Thread |
Previous Thread |
Next Message |
Previous Message
]
| |