summaryrefslogtreecommitdiffstats
path: root/vendor/fguillot/picofeed/docs/opml-import.markdown
blob: 9f47b376ac62192a197a4583a22f6adb4659e187 (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\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.