Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 376 Bytes

opml-import.markdown

File metadata and controls

19 lines (13 loc) · 376 Bytes

Import OPML file

Importing a list of subscriptions is pretty straightforward:

use PicoFeed\Serialization\Import;

$opml = file_get_contents('mySubscriptions.opml');
$import = new Import($opml);
$entries = $import->execute();

if ($entries !== false) {
    print_r($entries);
}

The method execute() return false if there is a parsing error.