|
|||||
|
In this assignment you will write 2 small PHP programs. Develop your code in the "assn17" directory.
Copy all of your Assignment 16 code from the assn16 directory to the assn17 directory.
For this part of the assignment, you will build a PHP script that generates an RSS feed from your blog's posts. The output will be all XML, there will not be any HTML in your output.
Follow the "PHP and RSS: Getting it together" (local mirror) article on how to generate RSS from a PHP program.
You may include any other RSS XML elements, provided the element content is valid. For example, the "language" element has specific values permitted and the "pubDate" has a specific date format that is to be use. Google for RSS specification details or see http://cyber.law.harvard.edu/rss/rss.html#requiredChannelElements for more.
For this part of the assignment you will build a standalone script that generates an HTML page from an RSS feed. Your script does not need to be part of your blog. You may integrate it into your blog, but it is not required.
Find an RSS feed on a blog somewhere out on the internet. Using the techniques from Chapter 28 of the book, generate an HTML page from the RSS feed. You may wish to review http://php.net/manual/en/domdocument.load.php for more info on the DomDocument class and http://php.net/manual/en/function.simplexml-load-file.php for more info on the simplexml_load_file function. Make sure the output validates.
htmlentities on the output of
all user entered data.Upload all your code to the "assn17" directory of your account on the Student Server. Test it. Make sure it works.
In the form below include the URL for your RSS Feed Generator script and the URL to your HTML page generated from the external RSS feed.
|