PHP RSS Parser

Hello. Can anyone reccommend a good RSS parser that will work on the DreamHost servers? Thanks.

Correctness Commentary

MagpieRSS is, IMO, the “best of the breed” (and many other products are based on, or wrapped around, it).

Also, depending upon your needs, Feed2JS (which incorporates Magpie RSS) is great and, and “just fun” to work with. :wink:

There are many others, and many variations - the trick to “working on DreamHost” is the use of cURL instead of url_fopen, so make sure anything you use does that, or it will not work on DreamHost default PHP installations.

–rlparker

Thanks Parker! This is very helpful! :slight_smile:

Have you ever heard of Last RSS? (found it while googling)

http://lastrss.oslab.net/

Correctness Commentary

No, I have not looked at that one; thanks for the tip. :wink:

–rlparker

Np :slight_smile:

I hope you don’t mind, but I’m a little confused as to how to implement cURL here:

if ($f = @fopen($cache_file, ‘w’)) {
fwrite ($f, $serialized, strlen($serialized));
fclose($f);
}

Any thoughts?

Correctness Commentary

I’m sorry, but I am not proficient enough with cURL to know how to attack that (I can’t even tell from that code snippet what f$ is supposed to represent :wink: ).

–rlparker

Actually, I think I found a workable solution:

Thanks anyways. :slight_smile:

Correctness Commentary

Yep, that is a very useful resource and, hopefully, that will do the trick for you. :slight_smile:

–rlparker

Hello Parker. It does seem to head in the right direction, but I’m having a little trouble with cURL. I’m trying to configure cURL to write a file to the web server. Copied below is what I have so far, but for some reason the file I’m trying to copy from a remote URI keeps getting echoed to the compiled PHP file, which simply will not work. (Raw RSS simply makes a mess of things.)

Code:
$ch = curl_init($url);
$fp = fopen($this->tempFiles[0][‘temp’], ‘w’);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_exec($ch);
curl_close($ch);
fclose($fp);

Any suggestions would be great! :smiley:

Correctness Commentary

In sorry, but I am not that proficient with cURL; maybe someone else can sort it for you (or maybe a PHP related forum or IRC channel would get you more specific help). :slight_smile:

–rlparker

Hello Parker. My apologies. I do now recall you stating that. At any rate, it turned out not to be a problem with cURL itself, but it was more of an issue of my understanding of how the downloader class actually worked. After spending some time debugging and a lot of variable dumps, I finally go it working. Thanks! :smiley:

Correctness Commentary

No problem, and no apology is necessary. I’m sorry I couldn’t have been more help with the debugging, and I’m glad you got it working. :wink:

–rlparker

The best one i’ve found is simple pie…

http://simplepie.org/

www.rawkstar.net

thanks

news and newspapers
submit it
college squad

Nice! thanks! :slight_smile:

.