Web space - WRITE YOUR OWN BLOG ENGINE $message = “RSS
WRITE YOUR OWN BLOG ENGINE $message = “RSS file updated.”; } // close file fclose($fh); The script uses the fwrite function to write the contents of $rssfile to the $fh file handler created at the beginning of the script. As with fopen, fwrite returns false if the writing process fails. Finally, the fclose function is used to release the index.xml file, and your RSS feed has been updated. But all you have at the moment is a function that can update your RSS feed. That function is not actually called from anywhere. Your RSS feed will need updating on three occasions: when you add a new blog post, when you update a post, and when you delete a post. The first two instances happen in the addpost.php file. So open that file. Just after the opening ” . makerssfeed(); Now find this line: $message = “Successfully update post ‘$title’.”; After that line, add the same call to makerssfeed. The delete blog function is on the index.php page in your CMS, so add the functions.php include to that file in the same way and add the same call to makerssfeed after this line: $message = “Post $delete deleted.”; Now try making a change to one of your blog posts using your CMS, which will force the RSS file to be created. Once you have received the message RSS file updated in your CMS, open up index.xml in your text editor and you should see something like this:
http://your-domain-name.com
]]> . 333