PHP package for parsing data feeds

Wondering how Criticker works, or have a question that doesn't seem to fit under requests or bugs?
rob
Posts: 9
0 Ratings
Your TCI: na
Joined: Tue Feb 27, 2007 2:31 pm

Re: PHP package for parsing data feeds

Post by rob »

Thanks for the data feeds, they'll come in handy! I wrote a PHP package for parsing text data here:

http://robm.me.uk/2007/08/14/php-criticker

However, your XML and RSS feeds for ratings are currently broken; you'll need to parse ampersands into their correct XML entity (either & or &) to get them working. If you're not escaping ampersands then I presume you're not escaping less-than and greater-thans either, but I've not seen a film with them in the title yet.

Thanks!
Rob

rob
Posts: 9
0 Ratings
Your TCI: na
Joined: Tue Feb 27, 2007 2:31 pm

Re: PHP package for parsing data feeds

Post by rob »

D'oh, those brackets were supposed to be an ampersand followed by amp; and #0x26; respectively

rob
Posts: 9
0 Ratings
Your TCI: na
Joined: Tue Feb 27, 2007 2:31 pm

Re: PHP package for parsing data feeds

Post by rob »

Also, if we're having random suggestions here, it would be nice if newlines were converted automatically to paragraph tags (á la Matt Mullenwegs Newlines to Paragraphs http://photomatt.net/scripts/autop/) in reviews, and if review fields were longer.

mpowell
Posts: 3929
1 Ratings
Your TCI: na
Joined: Fri Sep 09, 2005 10:22 am

Re: PHP package for parsing data feeds

Post by mpowell »

We're glad you like the feeds! I've opened a new bug report to make sure the ampersands are correctly translated... you're probably the first person besides us to spend much time looking at those feeds, so if you see any other errors, just let us know. Good point, too, about newlines in the forum. That'll be another bug fix coming down the line.

mpowell
Posts: 3929
1 Ratings
Your TCI: na
Joined: Fri Sep 09, 2005 10:22 am

Re: PHP package for parsing data feeds

Post by mpowell »

Hi Rob,

We've updated the forums now to automatically translate newlines into breaks. My

crazy

spacing
is just an example :)

rob
Posts: 9
0 Ratings
Your TCI: na
Joined: Tue Feb 27, 2007 2:31 pm

Re: PHP package for parsing data feeds

Post by rob »

Neat. Does it apply in reviews as well?

mpowell
Posts: 3929
1 Ratings
Your TCI: na
Joined: Fri Sep 09, 2005 10:22 am

Re: PHP package for parsing data feeds

Post by mpowell »

We've updated our 'All Your Rankings' data feeds. Check out the blog for details
We don't plan on allowing formatting inside Mini Reviews (mainly because we format them ourselves in a few different ways around the site)

rob
Posts: 9
0 Ratings
Your TCI: na
Joined: Tue Feb 27, 2007 2:31 pm

Re: PHP package for parsing data feeds

Post by rob »

Not allowing formatting such as HTML I can understand, but not even allowing line breaks? It would be pretty useful, IMO.

Also, since you're presumably offering your web services for actual consumption, it might be worth maintaining old versions (and by extension passing a version in the URL) so that future changes don't break code geared towards old versions. It'll certainly aid "mashups", to use the trendy parlance.

rob
Posts: 9
0 Ratings
Your TCI: na
Joined: Tue Feb 27, 2007 2:31 pm

Re: PHP package for parsing data feeds

Post by rob »

Oh, another bug (I bet you love me :P): you're encoding XML/HTML entities in your plain-text feeds, which shouldn't happen.

mpowell
Posts: 3929
1 Ratings
Your TCI: na
Joined: Fri Sep 09, 2005 10:22 am

Re: PHP package for parsing data feeds

Post by mpowell »

We do appreciate it! If you weren't pointing out these errors now, someone else would be soon enough. About the HTML encoding, you're talking about strings like '& quot;secret& quot;' (spacing added) appearing in a file like allrankings.txt, when it should just be 'secret', right?

Post Reply