PHPackages                             p3k/websub - 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. [API Development](/categories/api)
4. /
5. p3k/websub

ActiveLibrary[API Development](/categories/api)

p3k/websub
==========

A library for subscribing to and publishing WebSub feeds

0.0.1(9y ago)713.8k4[2 PRs](https://github.com/aaronpk/p3k-websub/pulls)MITPHP

Since May 8Pushed 5y ago2 watchersCompare

[ Source](https://github.com/aaronpk/p3k-websub)[ Packagist](https://packagist.org/packages/p3k/websub)[ Docs](https://github.com/aaronpk/p3k-websub)[ RSS](/packages/p3k-websub/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

p3k-websub
==========

[](#p3k-websub)

Usage
-----

[](#usage)

### Initialize the client

[](#initialize-the-client)

```
$http = new p3k\HTTP('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) p3k-websub/0.1.0 example');
$client = new p3k\WebSub\Client($http);
```

### Discover the hub and self URLs for a topic URL

[](#discover-the-hub-and-self-urls-for-a-topic-url)

```
// Returns false unless both hub and self were found
$endpoints = $client->discover($topic);

// $endpoints['hub']
// $endpoints['self']
```

### Send the subscription request

[](#send-the-subscription-request)

```
$secret = p3k\random_string(32);
$id = p3k\random_string(32);
$callback = 'http://localhost:8080/subscriber.php?id='.$id;

$subscription = $client->subscribe($endpoints['hub'], $endpoints['self'], $callback, [
  'lease_seconds' => 300,
  'secret' => $secret
]);
```

### Verify the signature

[](#verify-the-signature)

```
$signature = $_SERVER['HTTP_X_HUB_SIGNATURE'];
$document = file_get_contents('php://input');
$valid = p3k\WebSub\Client::verify_signature($document, $signature, $secret);
```

License
-------

[](#license)

Copyright 2017 by Aaron Parecki

Available under the MIT license.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3289d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/385b302aef27e9e72ddfbf65c8b15cfce5946744fe2e541c5b415665fc2351fc?d=identicon)[aaronpk](/maintainers/aaronpk)

---

Top Contributors

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

---

Tags

indiewebp3kpubsubhubbubwebsubfeedpubsubhubbubpubsubp3kindiewebwebsub

### Embed Badge

![Health badge](/badges/p3k-websub/health.svg)

```
[![Health](https://phpackages.com/badges/p3k-websub/health.svg)](https://phpackages.com/packages/p3k-websub)
```

###  Alternatives

[laminas/laminas-feed

provides functionality for creating and consuming RSS and Atom feeds

16749.2M47](/packages/laminas-laminas-feed)[pgrimaud/instagram-user-feed

This is a scraper to easily fetch any feed and interact with Instagram (like, follow, etc.) without OAuth for PHP.

940657.1k5](/packages/pgrimaud-instagram-user-feed)[mibe/feedwriter

Generate feeds in either RSS 1.0, RSS 2.0 or ATOM formats

1951.1M5](/packages/mibe-feedwriter)[debril/rss-atom-bundle

RSS / Atom and JSONFeed support for Symfony

1381.3M2](/packages/debril-rss-atom-bundle)[eko/feedbundle

A Symfony bundle to build RSS feeds from entities

142574.6k3](/packages/eko-feedbundle)[vitalybaev/google-merchant-feed

PHP package for creating Google Merchant products feed

91979.4k4](/packages/vitalybaev-google-merchant-feed)

PHPackages © 2026

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