954,604 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

PHP updating RSS feed???

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

bjeffries
Junior Poster
143 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
 

update? u can print ur feeds to id desc.

jack daniel
Newbie Poster
2 posts since May 2010
Reputation Points: 10
Solved Threads: 1
 

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

sallecpt
Junior Poster in Training
54 posts since Apr 2010
Reputation Points: 10
Solved Threads: 3
 

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.

Attachments rssgen2_0-2009-06-17.zip (7.64KB)
sallecpt
Junior Poster in Training
54 posts since Apr 2010
Reputation Points: 10
Solved Threads: 3
 

@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.

bjeffries
Junior Poster
143 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
 

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

bjeffries
Junior Poster
143 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: