How do I create an RSS feed and display it?

On the website I maintain for the radio station, they have a news page. Right now the news is being posted to a html page which is then read into a php page that includes all the navigation. I was asked to do this and the RSS feed. How should I do it? I know how to make an XML file, but the person who is editing the news file is not technical and needs a WYSIWYG editor. Is there a WYSIWYG editor for XML? Once I receive a feed, how do I display it on my site? I'm working with PHP on this site, so a PHP solution is preferred.

+2


source to share


7 replies


I figured that instead of looking for WYSIWYG for XML, I would let the news editor continue to load the news in HTML format. I ended up writing a php program to find the tags <p>

and </p>

and create an XML file from it.



0


source


Use Yahoo Pipes! : you don't need any programming knowledge + downloads on your site will be lower. Once you have your feed, display it on your site using a simple "image" anchor in HTML. You may want to consider channeling your feed through Feedburner .



And for freeby: if you want to track your channel's awareness data in rss use my service here .

+1


source


Do you mean that someone is manually inserting the feed content?

Typically, feeds are generated from the site's news content, which you should already have in your database. Just need to get a php script that fetches it and writes the xml.

Edit: no database used.

So now you only have 2 ways:

  • Use php regexp to get the content you want from the html page (or maybe phpQuery )
  • As you said, write the xml by hand and then upload it, but I havent tried any wysiwyg xml editor, sorry .. there are many others on google.
+1


source


Does this PHP site have a database? If so, the WYSIWYG editor is sent there, then a special PHP file generates an RSS feed.

0


source


I used the following IBM page as a guide and it worked great: http://www.ibm.com/developerworks/library/x-phprss/

0


source


You can use rssa.at - just enter your url and it will create an RSS feed for you. You can then sign up for alerts for free (hourly / daily / weekly / monthly) and access statistics.

0


source


If the HTML is consistent, you can just post them as usual and then flush the feed. There are programmatic ways to do this for sure, but http://www.dapper.net/dapp-factory.jsp is a good point and click on the clean up channel link. Then use MagpieRSS, SimplePie or Feed.informer.com to display your feed.

0


source







All Articles