Recommend this page to a friend! |
Classes of Ivan Melgrati | OPML Parser Class | README.md | Download |
|
DownloadOPML ParserOPML Parser Class: Extract the properties of content from OPML files. A file with the OPML file extension is an Outline Processor Markup Language file. It's saved using the XML format, and is used to exchange information between applications regardless of the operating system. The OPML file format is often seen used as the import/export format for RSS feed reader programs. Since a file of this format can hold a collection of RSS subscription information, it's the ideal format for backing up or sharing RSS feeds. The class retrieves local or remote OPML file and parses it to extract its content into a PHP iterator. Each of the iterator elements contains the URLs of the listed content as well all other the properties of each content entry such as: name, link target, description, RSS feed, creation date and content type (RSS, HTML, song, booklist, etc..). Developed by Ivan Melgrati Requirements
InstallationComposerThe recommended installation method is through
Composer, a dependency manager for PHP. Just add
<?php use imelgrat\OPML_Parser\OPML_Parser; $parser = new OPML_Parser(); // Get OPML from URL $parser->ParseLocation('http://www.bbc.co.uk/podcasts.opml', null); // Walk through each item in the same way as we would if $parser were a string (thanks to the Iterator interface) foreach ($parser as $key => $item) {
} ?>
|