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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.