Re: Retrieving many RSS feeds fast?



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!
.



Relevant Pages

  • Re: RSS enclosure downloader from command line?
    ... Somehow I am under impression that you want a perl script ... Something like that would do but I've got podracer going again. ... particular programme then grab an RSS feed of that search, ... grab the torrent files and put them into a directory to be ...
    (uk.comp.os.linux)
  • RE: [Full-disclosure] Google Reader "preview" and "lens" scriptimproper feed val
    ... RSS feed hijacking will soon become commonplace for worm to easily enter user systems through RSS feeds or news aggregators.. ... Google Reader "preview" and "lens" scriptimproper ... Google Reader "preview" and "lens" script improper feed validation ... Google Reader helps organise the contents of those rss or atom feeds for which the user is interested in or subscribed to. ...
    (Full-Disclosure)
  • a quick hack of an RSS reader, but it is damn slow
    ... Tonight I wanted to throw together a quick-n-dirty RSS reader, ... played around with some stuff and got this script working. ... to 1 weblog and it took several minutes for the ... with my web browser, the sites render quickly enough, and this script ...
    (comp.lang.php)
  • OT: formatting XML and RSS
    ... I've got this script which is supposed to format an entry as .91 RSS. ... $cbHowManyEntriesShouldWeListOnThisPage ...
    (comp.lang.php)
  • rss read issue with non-encoded char
    ... I have written a small perl script that reads a few RSS flows and ... generate an HTML file. ... this make the script stop. ... if I manually fetch the RSS file and read it, the problem ("at line 90, ...
    (perl.beginners)