Forum Moderators: open

Message Too Old, No Replies

XML RSS feed file from a flat database

seeking some input on how to do this

         

venice

5:22 am on May 19, 2007 (gmt 0)

10+ Year Member



I have an old news CGI script that writes its content to a text flat file database. I'd like to be able to convert data from the file to an XML file for an RSS feed.

The database file looks similar to this...
date¦:¦author¦:¦email¦:¦time¦:¦title¦:¦content

I'm thinking the time and date could be combined to create <pubDate>
title would become <title>
content would become <description>
and title with hyphens and .html would become <link>

I have no idea as of yet how to go about doing this, don't even know if it's possible. My thought is I could have a Cron job checking the flat file database regularly and updating information to a writable .XML file

Any scripts out there capable of doing this? If not, any suggestions on what steps to take to make this happen?

cmarshall

1:29 pm on May 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This may be something that can be handled by using something like Easy RSS [phpclasses.org].

venice

4:36 am on May 23, 2007 (gmt 0)

10+ Year Member



Thanks, I ended up going with FeedCreator.class.php and so far things have worked out great. Took a flat file database that gets written to daily from a news script and it's now outputting an RSS feed. Next step is to get this to work with my classified ads database.