Submit Your Article Forum Rules

Results 1 to 9 of 9

Thread: What is RSS? XML?

  1. #1
    Senior Member richkoi's Avatar
    Join Date
    Aug 2003
    Posts
    441

    What is RSS? XML?

    I see the little RSS buttons everywhere now. I click on them... and I see what looks like HTML code. I research it further and find there are RSS readers. I've even heard something about iPOD reading RSS feeds. I am assuming this is some standardized coding that allows users with RSS readers to view updated content from websites that have these feeds.

    However, I can't seem to find a straight answer on what this is. If it is what I think it is, it sounds like it would be useful to incorporate into information sites where content is updated regularly. I even found a PHP generator for RSS feeds that seems pretty simple to implement. http://usefulinc.com/rss/rsswriter/

    Help me understand what RSS/XML is and what potential it holds.

    Thanks,

    Rich

  2. #2
    WebProWorld MVP dharrison's Avatar
    Join Date
    May 2005
    Location
    Essex UK
    Posts
    1,334
    Mmm. This brings back memories. I felt this way a couple of weeks ago.

    You assume correctly. RSS Feeds can be anything from latest bits of news, latest entries on blogs daily cartoons and so on. RSS can be read as Email or on a web browser.

    I cannot vouch for the email one, but I went to http://www.bloglines.com/ and signed up for an account.

    Then when you go to a site and decide you want to subscribe to their RSS feed (eg BBC World News), You click the orange button and follow the instructions from there. When you get the Coded page, copy and paste the URL into your blog reader in the appropriate form field (Labelled blog or feed URL).

    You then check on it whenever you feel like it and get all the latest info.

    I use mine for Latest News and F1 news. If theres an RSS feed for Gary Larson Cartoons, I wanna know about it.

    As for Ipod/PHP, sorry don't know.

    HTH regardless
    Deb Harrison
    Essex Web Design | DVH Design Blog
    If I have helped please add to my Reputation

  3. #3
    Senior Member richkoi's Avatar
    Join Date
    Aug 2003
    Posts
    441
    I am using Google's reader. (http://www.google.com/reader) So far I love it.

    Now... I am going to try to create my own RSS feed.

    Rich

  4. #4
    Senior Member richkoi's Avatar
    Join Date
    Aug 2003
    Posts
    441
    There are thousands of articles on how to build a reader (aggregator?)...

    but how about a writer(?)? In PHP?

    What I would like to do is create a chunk of PHP code that takes my blog posts (title, desc, date, etc) and generates a XML file out of it. Any tutorials out there? Scripts?

    Rich

  5. #5
    Senior Member richkoi's Avatar
    Join Date
    Aug 2003
    Posts
    441
    Could I simply do this?

    Code:
    −<rss version="2.0">
    −<channel>
    <title>Blog Title</title>
    <link>http://www.blogurl.com</link>
    <description>RSS feed for Blog Title</description>
    <? //PHP database code ?>
    −<item>
    	<title><? echo $title; ?></title>
    	-<link><? echo $url; ?></link>
    	<pubDate><? echo $date; ?></pubDate>
    	−<description><? echo $post; ?></description>
    </item>
    <? //end database code ?>
    </channel>
    </rss>
    ...or am I missing something?

    Rich

  6. #6
    Senior Member
    Join Date
    Feb 2005
    Posts
    113
    I haven't done it for an RSS feed but I did make my Google sitemap.xml dynamic using PHP scripting.

    I had to add .xml to my .htaccess file to get it to prse PHP and then have it print the xml header like this:

    Code:
    <? header('Content-type: text/xml'); ?>
    <?php print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; ?>
    <?php print "<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.84\" >"; ?>
    William.

  7. #7
    Hello Rich,

    Quote Originally Posted by richkoi
    Could I simply do this?

    Code:
    ...
    ...or am I missing something?

    Rich
    That's it, as simple as that. Just read the RSS specification at http://blogs.law.harvard.edu/tech/rss (but you seemingly did this already), generate the mandatory fields and whatever of the optional fields you find useful.
    I did this for a site at http://www.snap-scan.com/us_pl.html and it's quite straightforward.

    best regards

    Sam
    Software-Pointers.com - Directory of Software Development Sites - Free submission.

  8. #8
    Senior Member richkoi's Avatar
    Join Date
    Aug 2003
    Posts
    441
    I figured it out in php... except I want to display it with the .xml extension. Unfortunately my host does not allow .htaccess extension changes, so I'm at a loss.

    Rich

  9. #9
    Senior Member
    Join Date
    Feb 2005
    Posts
    113
    Unfortunately my host does not allow .htaccess extension changes
    That's lame.

    The only other way I can think of is using a cron job to rewrite your .xml file periodically but I'm not sure how often you would want to run it.

    William.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •