THAT Agency Design Studio Blog

This PHP script will query your MySQL database’s table where you keep your news, articles and such and basically create an XML file from that information. Once you look into the file itself, you can see that the query would need to be changed to suit your needs, but that’s pretty much the end of it.

The script defines where the XML file is located that will get overridden in this case it would be .com/feeds/index.xml, but you can change that to what and where you want the file to be located.  You would also need to change the permissions on that file so that the class could override the file.

The one thing that I actually do personally, is call the class itself once I get a result back from:

1. an article being added to the system.

2. an article being deleted from the system.

Create RSS Feed

Create RSS Feed

Download to get the PHP file to “Creating a Dynamic (xml) RSS Feed  from PHP and MySQL

Share this article

3 Responses to "Creating a Dynamic (xml) RSS Feed from PHP and MySQL (script)"

  1. To change Rss back into mysql with php:

  2. how to i call it from the interpreting page e.g xml_source=”;

  3. I have just swapped hosts for my web site and the current method that I used for creating a feed doesn’t work on their server. I will give this one a go tonight and hopefully it will save me a headache.

    Many thanks for sharing this :)

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Copyright ©2006-2010 THAT Agency, LLC, a web design firm and web develelopment company. All Rights Reserved.
Partner website: THAT SEO Agency