Anyone have any simple PHP code to parse an RSS feed, most importantly one that allows you to both enable/disable descriptions and select the number of results to be shown? I can't seem to find one that works well and allows me to do this. Ian
There is magpie on sourceforge and Carp RSS by gecko tribe. There's also code for a php rss parser here in the forums that you can search for. I know Carp best myself, and it's very easy to enable/disable descriptions by just setting a variable before you output the feed.
nevet, would u have any idea about my problem here: http://forums.digitalpoint.com/showthread.php?t=23851 ?
I tried that one, and it's a great script but I couldn't figure out how to set the number of items it returns. Do you have any insight on how to set that? Thanks in advance! Ian
That's actually one thing I did figure out... In the php code, include this line above the CarpCacheShow statement: CarpConf('maxitems',10); change the 10 to whatever you want to change the max items to. cheers
This code is very easy to use: http://forums.digitalpoint.com/showthread.php?t=7354&highlight=rss+easy
Another great (very simple) one that I use for parsing daily-content RSS feeds and such, http://www.globalsyndication.com/rss-parser Josh
Magpie is the best that I've used so far. Few php lines of codes needed to use and very flexible. Another nice feature is that magpie cache the result so that you don't issue too many requests and upset the feed owner. Highly recommended! Magpie download at http://magpierss.sourceforge.net/ If you need example code on how to use it, let me know. _________________ PHP Hosting | Pagerank Checker Tool | Free Web Hosting | Web Master Resource Center
http://www.feedforall.com/free-php-script.htm I hacked it in 10 minutes and how do things like this: showrss('http://search.msn.com/results.aspx?='.$keywordplus.'&format=rss', ' ~~~BeginItemsRecord~~~ <A h ref="~~~ItemLink~~~">~~~ItemTitle~~~</A><br> ~~~ItemDescription~~~<BR> <p> ~~~EndItemsRecord~~~ ',10); Code (markup): The 10 is the # of records to return If you are a newbie programmer in PHP, it might take longer than 10 minutes to get something useful from this.
I need help on MAGPIE installation, how to implement and integrate in the easiest way to some web page? Is there some easy tutorial for it ? Thank you