Journal

Patrick Dunlap

 

Main

Design Document

Journal

Links

Contact Me

Feb 1, 2006:  I have decided to do a project using XML.  Dr. Adams talked about this on the first night of class and I had already thought that I wanted to learn more about it so I will do it with RSS feeds.  WIll talk with Dr. Adams later.

Feb 5, 2006:  Created design document a week early so that I could show this to Dr. Adams to get his feedback.

Feb 8, 2006:  Dr. Adams approves of my design document with little change suggested.

Feb 13, 2006:  I am going to scale back some of my project a little so that I do not bit off more then I can chew.  Loaded WAMP software, created website at Yahoo, and created Journal.

Feb 18, 2006:  I bought a small PHP book to help me with my coding

Feb 20, 2006:  I talked to one of our programmers at work and he gave me some sample code of his that I can look at.

Feb 21, 2006:  YES! I got my first PHP code to work pulling from a sample MySQL database that I created.  It does not do much but it make me feel very good about getting this project done.

Mar 5, 2006:  Sorry, I have been kind of lacks about writing in my project journal.  I have finish reading my PHP book and have performed all of the tests (the ones that apply to my project) in it.  I am going to start doing some serious programming now that I know what I am doing (sort of).

Mar 11, 2006:  I was working on the issue of the formatting of the RSS feed and then I got the idea that there might be editors out there that do this sort of thing.  Sure enough there are plenty of free ones.  I downloaded RSSeditior v3.  Of course my RSS has to be generated by PHP code but I find that I learn by example better then any other way and by using the editor to see what my RSS code should look like allows me to code per that example.  I have not yet figured out how to run the page (I am not a web admin my any means).  I have Apchhe running but when ever I run my php by doubleclicking, it comes up as gibberish in the web page.  Firefox is my default browser, maybe I need to try it in Explorer.  My Firefox is rather locked down so maybe is just will not run the code.

Mar 19, 2006:  Wow, I worked all weekend on my project, almost every waking hour.  I had a lot of ups and down but in the end, I got a simple, working PHP RSS page working. 

First of all, I ended up loading a new laptop for myself and switching all of my programs and data to the new system.  This is my work laptop and the last one had a lot of stuff on it that was making it run very slow.  I did not want to start loading junk on my new load so what I did was load VMWare 5.0 and loaded in a preconfigured WinXP virtual PC to load my WAmp programs and other project programs.  I had to figure out how to get the networking aspects working correctly and that took a little time but I finally got it up and running.

Then I loaded in a RSS reader, called RSS Point 2, to test my feeds on.  To ensure that the reader worked, I loaded the NPR RSS site into it.  I also did a source lookup on the NPR site.

I then tried to make my RSS/XML tags look like NPRs.  Well, lets just say that this was a blind alley.  One of the things that I did find out was that the NPR site uses something called a XML style sheet (rss.xsl).  I can not say that I fully understand what the style sheet does but it was complicated.

I then searched the web to find out how other people were doing PHP to RSS.  One of the things that I found was that there are class libraries that you can run to do some of the work for you.  I tried one of these but could not get it to work.

I searched more.  I was doing it with print statements but changed to echo.  Not sure if print would work but I wanted to follow examples to the T.  I then ran into a site that noted how to do it by generating a XML file and then doing a fwrite to that file.  But this file was not dynamic and was static.  I wanted a page that would generate the data when it was accessed.

I finally find a page that showed a very simple example of how to do it with echo.  But I could never get mine to work.  When I went to my page and then viewed the source, it looked OK except it has spaces at the top.  I created a .xml file from the source view and removed the spaces and bam, it worked.  So now I had to get rid of the spaces.  I could not figure out how to do that but one of the things that I was doing was running functions in my PHP to generated the code.  Once I got rid of the functions and ran the PHP as one big code, it worked!!!!!

Well, I am so geeked right now.  I am going to clean up my code, add some content stuff, and maybe rework the MySQL database.  I might also make a web page to add dynamic content to the database.

 

Grand Valley State Univerisy - Michigan