Re: Retrieving many RSS feeds fast?
- From: George Maicovschi <georgemaicovschi@xxxxxxxxx>
- Date: Sun, 30 Mar 2008 11:42:21 -0700 (PDT)
OK, me again, sorry for not being more specific earlier.
You should create a script (lets say parse_rss_ext.php) that parses
the RSS and outputs the result.
Then create another script (lets say parse_rss_core) that makes calls
to the parse_rss_ext.php script providing the RSS to be parsed and
receiving the response, then doing whatever needs to be done to the
response.
The code that emulates multi-threading in PHP is the following:
$rss_list is an array containing all the RSS feeds;
[code start]
$threads=array();
foreach ($rss_list as $rss)
$threads[$rss]=fopen('http://localhost/path/to/file/
parse_rss_ext.php?rss={$rss}','r');
foreach ($threads as $thread_rss=>thread)
if ($thread)
{
while (!feof($thread))
$responses[$thread_rss].=fgets($thread);
fclose($thread);
}
[code end]
Hope this helps you. Cheers!
.
- References:
- Retrieving many RSS feeds fast?
- From: Duke of Hazard
- Re: Retrieving many RSS feeds fast?
- From: George Maicovschi
- Retrieving many RSS feeds fast?
- Prev by Date: Re: addslashes/mysql_real_escape_string
- Next by Date: Re: Form helper issues "Invalid argument supplied for foreach()"
- Previous by thread: Re: Retrieving many RSS feeds fast?
- Index(es):
Relevant Pages
|