Jump to content

RSS Feed


proggR

Recommended Posts

I'm going to start coding a simple RSS feed tonight that will automatically update when I submit a new entry but I think I just thought of something that may have complicated my method.

I was planning on reading in the top two or three lines indivudually so that I would have the tags saved to a variable to write back again after I update. Then I was going to read in the rest of the file to another variable. Then I would write $firstLineTag.$secondLineTag.$newRSS.$oldRSS back to the RSS file. BUT

The problem I've just thought of is, the content read into $oldRSS will still contain the top two or three lines, will it not? Those would be the opening tags for the feed and thats why I want to rewrite them back on top. If I use fgets() to get each one will it remove them from the file and then fread() will it only get all the content following those two lines or will it get those two lines as well?

 

I'm not sure if I'm being clear but I'll try to clarify if need be.

Link to comment
https://forums.phpfreaks.com/topic/114058-rss-feed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.