Recent News
Copyright © 2014 THAT Agency . All Rights Reserved.
410 Evernia Street, Suite 118, West Palm Beach, FL 33401
Tel: (561) 832-6262 | Fax: (561) 832-7707

Creating a Dynamic (xml) RSS Feed from PHP and MySQL (script)

17 Apr Creating a Dynamic (xml) RSS Feed from PHP and MySQL (script)

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

  • adegbesan femi
    Posted at 10:51h, 17 August

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

  • Richie Pearce
    Posted at 10:31h, 18 February

    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 :)

  • Jonathan Trac
    Posted at 07:43h, 03 October

    This is extremely useful for me as I have absolutely no knowledge about RSS. Thanks a lot Rich!

  • Shaun Monaldi
    Posted at 23:30h, 22 May

    I will immediately snatch your rss as I can not find your e-mail subscription link or e-newsletter service. Do you have any? Please let me recognize in order that I may subscribe. Thanks.

  • Den
    Posted at 06:19h, 16 June

    Thanks. This is what I need now.