Magpie RSS - PHP RSS Parser
Time 2021-11-23 11:23:43Web Name: Magpie RSS - PHP RSS Parser
WebSite: http://magpierss.sourceforge.net
ID:245946
Keywords:
RSS,Magpie,Parser,PHP,Description:
keywords: description: MagpieRSS: RSS for PHPHome Blog Download Features FAQ Links Todo
MagpieRSS provides an XML-based (expat) RSS parser in PHP.MagpieRSS is compatible with RSS 0.9 through RSS 1.0. Also parses RSS 1.0's modules, RSS 2.0, and Atom. (with a few exceptions)
News! Excited to announce that AOE media, a TYPO3 $rss = fetch_rss($url); Parses RSS 0.9 - RSS 1.0 Parses most RSS formats, including support for 1.0 modules and limited namespace support. RSS is packed into convenient data structures; easy to use in PHP, and appropriate for passing to a templating system, like Smarty. Integrated Object Cache Caching the parsed RSS means that the 2nd request is fast, and that including the rss_fetch call in your PHP page won't destroy your performance, and force you to reply on an external cron job. And it happens transparently. HTTP Conditional GETs Save bandwidth and speed up download times with intelligent use of Last-Modified and ETag.See HTTP Conditional Get for RSS Hackers Configurable Makes extensive use of constants to allow overriding default behaviour, and installation on shared hosts. Modular rss_fetch.inc - wraps a simple interface (
fetch_rss()
) around the library. rss_parse.inc - provides the RSS parser, and the RSS object rss_cache.inc - a simple (no GC) object cache, optimized for RSS objects rss_utils.inc - utility functions for working with RSS. currently provides parse_w3cdtf()
, for parsing W3CDTF into epoch seconds. More Secure - supports HTTP authentication, and SSL Bandwidth friendly - supports transparent GZIP encoding to reduce bandwidth usage Does not use fopen()
, work even if allow_url_fopen is disabled. Magpie's approach to parsing RSSMagpie takes a naive, and inclusive approach. Absolutely non-validating, as long as the RSS feed is well formed, Magpie will cheerfully parse new, and never before seen tags in your RSS feeds.
This makes it very simple support the varied versions of RSS simply, but forces the consumer of a RSS feed to be cognizant of how it is structured.(at least if you want to do something fancy)
Magpie parses a RSS feed into a simple object, with 4 fields: channel
, items
, image
, and textinput
.
channel $rss->channel
contains key-value pairs of all tags, without nested tags, found between the root tag (rdf:RDF, or rss) and the end of the document.
items $rss->items
is an array of associative arrays, each one describing a single item. An example that looks like:
item rdf:about="http://protest.net/NorthEast/calendrome.cgi?span=eventID=210257"titleWeekly Peace Vigil/titlelinkhttp://protest.net/NorthEast/calendrome.cgi?span=eventID=210257/linkdescriptionWear a white ribbon/descriptiondc:subjectPeace/dc:subjectev:startdate2002-06-01T11:00:00/ev:startdateev:locationNorthampton, MA/ev:locationev:enddate2002-06-01T12:00:00/ev:enddateev:typeProtest/ev:type/item
Is parsed, and pushed on the $rss-items
array as:
array( title = 'Weekly Peace Vigil', link = 'http://protest.net/NorthEast/calendrome.cgi?span=eventID=210257', description = 'Wear a white ribbon', dc = array ( subject = 'Peace' ), ev = array ( startdate = '2002-06-01T11:00:00', enddate = '2002-06-01T12:00:00', type = 'Protest', location = 'Northampton, MA' ));
image and textinput $rss->image
and $rss-textinput
are associative arrays including name-value pairs for anything found between the respective parent tags.
Usage Examples: A very simple example would be:
require_once 'rss_fetch.inc';$url = 'http://magpie.sf.net/samples/imc.1-0.rdf';$rss = fetch_rss($url);echo "Site: ", $rss->channel['title'], "br";foreach ($rss->items as $item ) { $title = $item[title]; $url = $item[link]; echo "a href=$url$title/a/libr";}More soon....in the meantime you can check out a cool tool built with MagpieRSS, version 0.1.
Todos RSS Parser Swap in a smarter parser that includes optional support for validation, and required fields. Improve RSS 2.0 support, in all its wacky permutations (as much as I'm annoyed by it) Improve support for modules that rely on attributes RSS Cache Light-weight garbage collection Fetch RSS Attempt to auto-detect an RSS feed, given a URL following, much like rssfinder.pydoes. Misc More examples A test suite RSS generation, perhaps with RSSwriter?
Getting Help With Magpie Read the Frequently Asked Questions Read How to Get Help with MagpieRSS Read over the How To section on the links page, to see if an existing solutions work for you. Read over the mailing list archives Subscribe to magpierss-general and ask your question.
RSS Resources RSS Tutorial for Content Publishers and Webmasters is a great place to start. RSS Workshop: Publish and Syndicate Your News to the Web is also a good introduction Finding More Channels on how to find RSS feeds. The Mapgie FAQ and Links pages can be very useful.RSS-DEV mailing list is generally a very helpful, informative space, with the occasional heated debate RSS Validator
License and Contact Info
Magpie is distributed under the GPL license...
Questions, and suggestions, magpierss-general@lists.sf.net
coded by: kellan (at) protest.net, feedback is always appreciated.
Development sponsored in part by AOE media, a TYPO3 & Open Source provider from Germany.
<<< Thank you for your visit >>>
Websites to related : USA Free Space - web site hostin
keywords:
free web hosting, free web site hosting, free website hosting, image hosting, free hosting, cheap web hosting, website hosting, domain host
keywords:
description:
Photohab Photography BlogDaily photography inspirations and articles from talented professional and amateur photographers from
keywords:free online dating, meet people, hot or not personals,dating, adult dating,hot or not,hot guys, hot girls,online dating,meet people,free dati
Young, Sober, & Free: Hazelden's keywords:
description:
Young, Sober, Day By Day. All rights reserved.
keywords:
description::
Not-for-Profit, Award-Winning Community News and Views for Windham County, Vermont • Since 2006•DONATE/JOINSUBMIT NEWSADVERT
keywords:
description:Low cost quality Car Hire, Van and Minibus Rental for London, South East England, Heathrow Airport and Gatwick Airport.
keywords:
description:
Ste-Emilie Skillshare | Community Arts Collective Who We Are / Mandate Our Mandate:The Ste-Emilie
keywords:
description:
Zum Hauptinhalt springen15. bis 18. November 2022DIE MESSEDIGITALAUSSTELLER PRODUKTEAUSSTELLENBESUCHENPROGRAMMAWARDSPRESSESie
keywords:贾尼克拉布里克酒店 圣卡荐,圣卡荐贾尼克拉布里克酒店 预订,圣卡荐贾尼克拉布里克酒店 廉价
description:贾尼克拉布里克酒店 圣卡荐 - 3星级酒店. 贾尼克
keywords:
description:Free Australia reverse phone lookup service. Find any listed or unlisted mobile phone or land line in Australia. Simple reverse
Hot Websites