proggR Posted July 10, 2008 Share Posted July 10, 2008 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. Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted July 10, 2008 Share Posted July 10, 2008 Make sure to use proper XML and you can always use http://www.php.net/manual/en/ref.domxml.php PHP DomDocument Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.