Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Use an open source PHP class to fetch articles from RSS, ATOM and OPML feeds
* Retrieve and parse OPML (Outline Processor Markup Language) Parser Class.
* Extracts the properties of content from OPML files using a PHP class
* @link
* @link
use imelgrat\OPML_Parser\OPML_Parser;
$parser = new OPML_Parser();
// Get OPML from URL
$parser->ParseLocation('', 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)
echo "<p> Item: " . $key . '</p><ul>';
foreach ($item as $attribute => $value)
echo '<li>' . '<strong>' . $attribute . '</strong>:' . $value . '</li>';
echo '</ul>';
echo '<p>&nbsp;</p>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment