PHPackages                             brego/feedbin-opml-export - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. brego/feedbin-opml-export

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

brego/feedbin-opml-export
=========================

Convert Feedbin subscriptions to an OPML file, which can be published on your website

31PHP

Since Nov 6Pushed 6y ago2 watchersCompare

[ Source](https://github.com/brego/feedbin-opml-export)[ Packagist](https://packagist.org/packages/brego/feedbin-opml-export)[ RSS](/packages/brego-feedbin-opml-export/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Feedbin to OPML export
======================

[](#feedbin-to-opml-export)

Using [Feedbin API](https://github.com/feedbin/feedbin-api), fetch and convert your [Feedbin](https://feedbin.com) subscriptions to an OPML file, which can be published on your website.

This library is meant to periodically publish a list of your personal subscriptions - there is no built in cache mechanism, but please implement that on your end. There's no reason to missuse the API server ressources.

Usage
-----

[](#usage)

Construct an object of `Brego\FeedbinOpmlExport\Curl` with your Feedbin credentials, pass it to `Brego\FeedbinOpmlExport\Feedbin`, and run `fetchAndConvertToOpml` to get an instance of `Brego\FeedbinOpmlExport\Opml\Document` which you can manipulate, save to disk as OPML or echo directly.

The following examples are also found in the `examples` directory:

### Simple example

[](#simple-example)

```
use Brego\FeedbinOpmlExport\CurlFake;
use Brego\FeedbinOpmlExport\Feedbin;

/**
 * Your user and password for Feedbin.
 */
$user = 'your-feedbin@account.user';
$password = 'your-feedbin-password';

/**
 * CurlFake is a stub Used for testing, so we don't call the live API all of the time. It uses json
 * files found in `/json-examples/`.
 *
 * Use Brego\FeedbinOpmlExport\Curl to call the API.
 */
$curl = new CurlFake($user, $password);
$feedbin = new Feedbin($curl);

/**
 * This shortcut method fetches subscriptions, taggings, and convert those to an OPML document
 * containing subscriptions and categories. See example-full.php for more controll.
 */
$document = $feedbin->fetchAndConvertToOpml('RSS subscriptions for John Doe', 'johndoe@exemple.com');

echo $document;
```

### Full example

[](#full-example)

```
use Brego\FeedbinOpmlExport\CurlFake;
use Brego\FeedbinOpmlExport\Feedbin;
use Brego\FeedbinOpmlExport\Opml\Document;
use Brego\FeedbinOpmlExport\Opml\Element;
use Brego\FeedbinOpmlExport\Opml\Outlines;

/**
 * Your user and password for Feedbin.
 */
$user = 'your-feedbin@account.user';
$password = 'your-feedbin-password';

/**
 * CurlFake is a stub Used for testing, so we don't call the live API all of the time. It uses json
 * files found in `/json-examples/`.
 *
 * Use Brego\FeedbinOpmlExport\Curl to call the API.
 */
$curl = new CurlFake($user, $password);
$feedbin = new Feedbin($curl);

/**
 * The Feedbin class provides interfaces to fetch Subscriptions and Taggings, and make categories
 * out of those. This is usefull if you need to manipulate those in any way before converting to
 * OPML.
 */
$subscriptions = $feedbin->fetchSubscriptions();
$taggings = $feedbin->fetchTaggings();
$categories = $feedbin->makeCategories($subscriptions, $taggings);

$document = (new Document())
    ->head(
        function(Element $head) {
            $head
                ->addAttribute('title', 'RSS subscriptions for John Doe')
                ->addAttribute('ownerEmail', 'johndoe@exemple.com')
                ->addAttribute('dateUpdated', (new DateTime())->format(DateTime::RFC822));
        }
    )
    ->body(
        function(Element $body) use ($subscriptions, $categories) {
            $body
                ->addChildren(Outlines::from($subscriptions))
                ->addChildren(Outlines::from($categories));
        }
    );

/**
 * `flatten()` shown here can be useful if you want to save the OPML document to a file.
 */
echo $document->flatten();
```

Links
-----

[](#links)

- [Feedbin](https://feedbin.com)
- [Feedbin API](https://github.com/feedbin/feedbin-api)

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f1502786209e645e2a6644851d89034722fca23095787f5cebfcf2310b78e4f?d=identicon)[Brego](/maintainers/Brego)

---

Top Contributors

[![brego](https://avatars.githubusercontent.com/u/26948?v=4)](https://github.com/brego "brego (2 commits)")

---

Tags

composer-packagefeedbinfeedbin-exportopmlopml-exportphpphp-libraryrss

### Embed Badge

![Health badge](/badges/brego-feedbin-opml-export/health.svg)

```
[![Health](https://phpackages.com/badges/brego-feedbin-opml-export/health.svg)](https://phpackages.com/packages/brego-feedbin-opml-export)
```

###  Alternatives

[knplabs/knp-menu-bundle

This bundle provides an integration of the KnpMenu library

1.4k53.8M315](/packages/knplabs-knp-menu-bundle)[gbrock/laravel-table

Table functionality for Laravel models

7644.3k](/packages/gbrock-laravel-table)[okapi/aop

PHP AOP is a PHP library that provides a powerful Aspect Oriented Programming (AOP) implementation for PHP.

3812.0k](/packages/okapi-aop)[chocofamilyme/laravel-healthcheck

Serves functionality of healthchecks of your application

11105.9k](/packages/chocofamilyme-laravel-healthcheck)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
