magpierss:php RSS Parser

Source: Internet
Author: User
Tags rss parser
Rss

Magpierss is a good RSS parsing class that fully supports RSS 0.9-1.0 and partially supports RSS 2.0.

* Supports RSS 0.9-1.0 with limited RSS 2.0 support
* Supports namespaces, and modules, including Mod_content and mod_event
* Open minded [1]
* Simple, functional interface, to object oriented backend parser
* Automatic caching of parsed RSS objects makes its easy to integrate
* Supports conditional get with last-modified, and ETag
* Uses constants for easy override of default behaviour
* Heavily commented

The RSS parser used by the PHP News aggregation tool Lilina is magpierss.

This thing is very simple to use, below is an official example:

Require_once (RSS_FETCH.INC);
$url = $_get[' url '];
$rss = Fetch_rss ($url);

Echo

"

"
"" Channel Title: ". $rss->channel[' title ']. " ;
echo ";
foreach ($rss->items as $item) {
$href = $item [' link '];
$title = $item [' title '];
echo "
$title ";
}
echo ";




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.