PHP RSS Parser

design

#1

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

Correctness Commentary


#2

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


#3

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


#4

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

–rlparker


#5

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


#6

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


#7

Actually, I think I found a workable solution:

Thanks anyways. :slight_smile:

Correctness Commentary


#8

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

–rlparker


#9

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


#10

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


#11

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


#12

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


#13

The best one i’ve found is simple pie…

http://simplepie.org/

www.rawkstar.net


#14

thanks

news and newspapers
submit it
college squad


#15

Nice! thanks! :slight_smile:

.