Jump to content

RSS Help


Spunky

Recommended Posts

Hey all, I'm trying to figure out how to use RSS. I've read the sticky and checked the links located there to see if they were helpful already. As with any code, I like to test before I make go completely live. Also right now I don't have anything I want live, I just want to learn how to do RSS feeds. I've read the tutorials on W3Schools. I would just like to take a simple feed code, and get it working, and then make adjustments as I learn how it works. Trouble is, I am unsure how to get it set up. In both the W3 tutorials as well as another one I am reading, they get to steps of publishing, "letting the world know" about the RSS feed. Well, I don't want the world to know. I just want a nice quiet place to test my feed. What exactly do I have to do to simply publish what I need to publish to get a working feed? Even ultimately I don't want the feed available to the world, just trying to get specific content feeding to a webpage.

Link to comment
Share on other sites

The feed works just by having the RSS file available, that's it, there's nothing more to it. If your website has dynamic content you have to make a server-side language update the RSS file when new content is added unless you want to update and re-upload the file manually yourself. If your feed is online you can check if it's valid here: http://feedvalidator.org/There's nothing much to an RSS feed, somebody has to be subscribed to the feed with their RSS reader. To show visitors on your website that you have a feed you can use a <link> tag.

Link to comment
Share on other sites

Okay, then I must be missing something. I copied the code of an RSS feed from the tutorial into a .xml file and linked to it. I uploaded it online to a site I have first because I am not sure if it requires a host, and it is not working. It just shows the code from the file. For example the code I am using is:

<rss version="2.0"><channel><title>W3Schools Home Page</title><link>http://www.w3schools.com</link><description>Free web building tutorials</description><item><title>RSS Tutorial</title><link>http://www.w3schools.com/rss</link><description>New RSS tutorial on W3Schools</description></item><item><title>XML Tutorial</title><link>http://www.w3schools.com/xml</link><description>New XML tutorial on W3Schools</description></item></channel></rss>

When I click on the link to the .xml file, it shows the code and says this on top of the page: This XML file does not appear to have any style information associated with it. The document tree is shown below.

Link to comment
Share on other sites

You should probably give the file a .rss extension and use .htaccess to tell the server to send it with an "application/rss+xml" Content-type header.If your server supports PHP you can give the file a .php extension and make PHP send the header:

<?php header ("Content-type: application/rss+xml"); ?>

Link to comment
Share on other sites

Oops for some reason I thought it said .xml extension. Alright well I changed it, same issue, just shows the code. I didn't do anything with the .htaccess because I don't anything about it and research didn't help much except I did read that you should use the text/xml content header since it is written in xml. The server does support PHP but I imagine I have to do more than change the extension to make it a PHP file. Honestly, I just want some working code to see how this works. I can learn from working code. Can someone do that for me?

Link to comment
Share on other sites

What browser are you using? I know that Firefox can read RSS feeds. You need RSS reading software to use feeds. Even with a .xml extension it would work by adding it to the feed reader. You can add feeds to Google Reader.

Link to comment
Share on other sites

I don't want to add it anywhere. I want to see how RSS feeds work in the privacy of my own home. I am using Google chrome. What's the RSS reading software for? Probably to do something I am not interested in at this stage of my RSS learning experience. I accidentally recently closed the original page I was looking at asides from w3schools but here's a similar page that states a couple of simple steps to get a RSS feed working. .xml extension and all: http://pageaffairs.com/notebook/create-your-own-simple-rss-feed This is simply all I am trying to do right now and then with a working feed I can expand my knowledge. I will try this guy's steps and see if they work better. But it was similar instructions to this that I followed before my first post, to which I was trying to figure out why wasn't working when I posted.

Link to comment
Share on other sites

Because Chrome doesn't have a built-in RSS reader. Most browsers don't. RSS feeds are meant to be read by a reader, it's not something a browser necessarily has to do.

Link to comment
Share on other sites

  • 2 weeks later...

Ok so I actually have a question on this then since I really don't know much about even using RSS feeds on the consumer side; I've never subscribed to one or anything. Are RSS readers something that the user needs to download and install to their browser to be able to go around reading and subscribing to feeds? I just noticed the RSS button on the bottom left of this page, I tried clicking it, as a Chrome user it only showed me the XML file. So, would you say that coders shouldn't rely on RSS feeds to design a page? For instance, I am helping a Realtor with their website and part of it is showing their listings. They show them all and a quick summary on one page and then you can click on them individually to view all the details. Right now it is being coded by hand. There is a company she recently started using that creates a RSS feed of their listings and allows each individual one to be clicked on. It's fantastic this is exactly what she was doing but was more work. Problem is though, people who don't actually have a RSS reader or know anything about it (and the audience being people buying houses you're bound to run into a lot that don't know much about computers), will be out of luck right? Onto my second thought. How possible would it be to have what is in a RSS feed, or really, the XML document created, be entered directly into a database? I have more experience with databases and just entering the data into one for it to be loaded individually already makes more sense than hand coding for each house (still lots of copy and paste). I'm just trying to figure out an easier way for the Realtor to show her listings. My knowledge of RSS isn't big enough to sort out possibilities and such though.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...