is it possible to use PHP to update an RSS feed. I dont already have the RSS feed created, but my site is finished, well for now it is, and want to know if it is possible to do this.

My site is scripted using PHP and and every time I upload a new photo gallery or video I want the PHP to automatically update my feed.

If this is possible would someone be willing to help me out??
IE: links, articles, somethings to get me started!!

Thanks!!
Brian

update? u can print ur feeds to id desc.

yes, it is possible, I have just completed a large web project for someone and to get you starting, I use a cron job to update my rss feed every 15 minutes. Basically, it is php code and a cron job, to write to my rss file.

So, to get you starting, the answer is yes, it is possible

I got this rss generator from phpclasses.com (thinks thats the address)
so all you need to do is use the fwrite command to write to your rss file.

to simplify my description, in short, you need to code a small php script (basic) using fwrite to "duplicate" the example.php file's contents, by writing it to your rss file.

So, what you can do, is create a sql recordset, and every time when someone posts data, use the fwrite command to write the posted data to your rss file.

its not that difficult man.

good luck, hope that I could be of assistance.

@sallecpt I am definitely going to look into the cron job, thanks for your help.
@jack daniel My intentions are to pretty much overwrite the RSS feed I don't want a list of RSS feeds I just want one RSS feed with the icon in the address bar in the web browser. My site only gets updated maybe twice a week so I don't need to create a list of any sort.

Thanks for all the help and I am going to do some more research into how to acomplish this.

yeah it sounds pretty easy, I will give it a shot ! thanks!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.