summaryrefslogtreecommitdiffstats
path: root/vendor/fguillot/picofeed/docs/opml-import.markdown
blob: 8ce2026c3c3d1e76d6f6a1e6b37d21873d7b9646 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Import OPML file
================

Importing a list of subscriptions is pretty straightforward:

```php
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.