Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 899 Bytes

opml-export.markdown

File metadata and controls

46 lines (36 loc) · 899 Bytes

OPML export

Example with no categories

use PicoFeed\Serialization\Export;

$feeds = array(
    array(
        'title' => 'Site title',
        'description' => 'Optional description',
        'site_url' => 'http://petitcodeur.fr/',
        'site_feed' => 'http://petitcodeur.fr/feed.xml'
    )
);

$export = new Export($feeds);
$opml = $export->execute();

echo $opml; // XML content

Example with categories

use PicoFeed\Serialization\Export;

$feeds = array(
    'my category' => array(
        array(
            'title' => 'Site title',
            'description' => 'Optional description',
            'site_url' => 'http://petitcodeur.fr/',
            'site_feed' => 'http://petitcodeur.fr/feed.xml'
        )
    )
);

$export = new Export($feeds);
$opml = $export->execute();

echo $opml; // XML content