blog 
2007/10/19

Feed Me

There is now an RSS feed for Kotogoto news. I am planning to add one to Kotogoto Daily as well, but currently I feed the feed by hand, and I don't want to do so every day for Daily. I'd like to have the feed generated automatically from the database, but this seems to be somewhat complicated.


Comments

– 2007-10-20 11:56:07

DUDE!! Awesome, man!

I was thinking of adding an RSS feed to my site as well. Just last week, in fact. For me it'll be a little complicated since I want to have one single feed that includes everything updated (comments, Doom stuff, drawings, etc.), so lots of tables to look into and pull out data from.

BUT, here's the interesting thing, I don't think you have to do the feed by hand. You could have your RSS link point to a PHP script that dynamically outputs the XML content to whoever (person/software, heh) is asking for it. That's what I want to try.

Btw, I love the title :)

– 2007-10-20 15:24:22

Yeah, that is about what I read as well. You can use PHP to do an SQL request and write the result into the XML. Do you have any good web links about this topic?

Also, you could call the PHP script either manually (like once after you wrote an update), or have this done like once per day with a cronjob (although I think my provider doesn't support cronjobs).

– 2007-10-22 20:24:21

Links? No man I don't at the moment, but I'm sure you could find some. I started with Wikipedia first, to understand what the RSS file looks like.

I also downloaded Wordpress to take a peek at the code :) (every Wordpress blog automatically comes with RSS feeds.

I guess all three alternatives you pointed out are viable ones, though I think the best one is the dynamic generation of the file. My doubt now is, since my posts contain HTML within them, how do I format them so that the XML doesn't get confused with the tags? I saw [!CDATA] or something like that used for this purpose, though haven't figured it out yet.

– 2007-10-24 23:43:53

I know someone who's all crazy about Wordpress at the moment, right, David? ;-) I think I really should have a look at it, not because of RSS specifically but generally.

You're right about the HTML tags in XML though. I didn't think about it before you mentioned it actually, but I can imagine it could be a real problem. The CDATA statement is available in MySQL as well, so it probably works the same in XML (never used it in SQL though).

Pablo
– 2007-10-26 03:00:55

is there any use for rss at all? it always looked pointless to me :-)

– 2007-11-10 15:58:31

Dude, I finally went ahead and added an RSS feed to my site as well... as we were talking about earlier, I am generating the feed dynamically.

I wrote a quite detailed update on my site about this... perhaps that would qualify as "a good web link" as you were referring to earlier? :D


Back to the blog.