PHPackages                             fanout/pubcontrol - 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. fanout/pubcontrol

Abandoned → [fanout/grip](/?search=fanout%2Fgrip)ArchivedLibrary[API Development](/categories/api)

fanout/pubcontrol
=================

A PHP convenience library for publishing messages using the EPCP protocol.

2.3.0(8y ago)3105.3k—1.4%2[2 issues](https://github.com/fanout/php-pubcontrol/issues)[1 PRs](https://github.com/fanout/php-pubcontrol/pulls)2MITPHPPHP &gt;=5.3.0

Since Jan 17Pushed 8y ago4 watchersCompare

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

READMEChangelogDependencies (2)Versions (15)Used By (2)

php-pubcontrol
==============

[](#php-pubcontrol)

Author: Konstantin Bokarius

EPCP library for PHP.

License
-------

[](#license)

php-pubcontrol is offered under the MIT license. See the LICENSE file.

Requirements
------------

[](#requirements)

- openssl
- curl
- pthreads (required for asynchronous publishing)
- firebase/php-jwt &gt;=1.0.0 (retreived automatically via Composer)

Installation
------------

[](#installation)

Using Composer: 'composer require fanout/pubcontrol'

Manual: ensure that php-jwt has been included and require the following files in php-pubcontrol:

```
require 'php-pubcontrol/src/format.php';
require 'php-pubcontrol/src/item.php';
require 'php-pubcontrol/src/pubcontrolclient.php';
require 'php-pubcontrol/src/pubcontrol.php';
```

Asynchronous Publishing
-----------------------

[](#asynchronous-publishing)

In order to make asynchronous publish calls pthreads must be installed. If pthreads is not installed then only synchronous publish calls can be made. To install pthreads recompile PHP with the following flag: '--enable-maintainer-zts'

Also note that since a callback passed to the publish\_async methods is going to be executed in a separate thread, that callback and the class it belongs to are subject to the rules and limitations imposed by the pthreads extension.

See more information about pthreads here:

Usage
-----

[](#usage)

```
