![]() |
Rss Feed - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Rss Feed (/showthread.php?tid=16189) |
Rss Feed - El Forum - 02-27-2009 [eluser]Dimitrio[/eluser] Hello, Using CI, my webapp has a home page that populates with data from the DB, think of it as a microbloggin clone. How do I go about creating a rss feed for it? Sorta new to PHP. Thnx. Rss Feed - El Forum - 02-27-2009 [eluser]pistolPete[/eluser] http://www.derekallard.com/blog/post/building-an-rss-feed-in-code-igniter Rss Feed - El Forum - 02-27-2009 [eluser]Dimitrio[/eluser] Thank you so much, I actually tried googling it, but to no avail. That will work perfectly. D Rss Feed - El Forum - 03-10-2009 [eluser]giannis[/eluser] Thanks for the instructions Derek. Works like a charm. Just a small observation...Shouldnt we add at the top of the rss view the following : Code: header("Content-Type: text/xml"); That because although the modern browsers render the xml document and present it, IE 6 (how bizzare !!!) cannot do this. Thus if you try to open your rss feed link with IE 6 you will get an error message. By adding the above, IE 6 will just display the xml document and not complain about the output of the script. Rss Feed - El Forum - 03-10-2009 [eluser]pistolPete[/eluser] It depends on how "valid" you want your feed to be. http://feedvalidator.org/docs/warning/EncodingMismatch.html Quote:RSS feeds should be served as application/rss+xml (RSS 1.0 is an RDF format, so it may be served as application/rdf+xml instead). Atom feeds should use application/atom+xml. Alternatively, for compatibility with widely-deployed web browsers, any of these feeds can use one of the more general XML types - preferably application/xml. |