PHPackages                             erp-mgroen/phpcent - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. erp-mgroen/phpcent

ActiveLibrary[HTTP &amp; Networking](/categories/http)

erp-mgroen/phpcent
==================

Php library to communicate with Centrifugo/Centrifuge)

1.0.4(10y ago)04MITPHPPHP &gt;=5.3.0

Since Jun 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/erp-mgroen/phpcent)[ Packagist](https://packagist.org/packages/erp-mgroen/phpcent)[ Docs](https://github.com/centrifugal/phpcent)[ RSS](/packages/erp-mgroen-phpcent/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (5)Used By (0)

Phpcent
=======

[](#phpcent)

Php library to communicate with Centrifugo HTTP API.

Library is published on the Composer:

```
{
    "require": {
        "erp-mgroen/phpcent":"dev-master",
    }
}
```

Full [Centrifugo documentation](https://fzambia.gitbooks.io/centrifugal/content/)

Basic Usage:

```

        $client = new \phpcent\Client("http://localhost:8000/api");
        $client->setSecret("secret key from Centrifugo");
        $client->publish("main_feed", ["message" => "Hello Everybody"]);
        $history = $client->history("main_feed");

```

You can use `phpcent` to create frontend token:

```
	$token = $client->setSecret($pSecret)->generateClientToken($user, $timestamp);
```

Or to create private channel sign:

```
	$sign = $client->setSecret($pSecret)->generateClientToken($client, $channel);
```

Since 1.0.3 phpcent has broadcast implementation.

```
$client->broadcast(['example:entities', 'example:moar'], ['user_id' => 2321321, 'state' => '1']);
```

### SSL

[](#ssl)

In case if your Centrifugo server has invalid SSL certificate, you can use:

```
\phpcent\Transport::setSafety(\phpcent\Transport::UNSAFE);
```

Since 1.0.5 you can use self signed certificate in safe manner:

```
$client = new \phpcent\Client("https://localhost:8000/api");
$client->setSecret("secret key from Centrifugo");
$transport = new \phpcent\Transport();
$transport->setCert("/path/to/certificate.pem");
$client->setTransport($transport);
```

*Note:* Certificate must match with host name in `Client` address (`localhost` in example above).

Alternative clients
===================

[](#alternative-clients)

- [php-centrifugo](https://github.com/oleh-ozimok/php-centrifugo) - allows to work with Redis Engine API queue.
- [php\_cent](https://github.com/skoniks/php_cent) by [skoniks](https://github.com/skoniks)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 62.5% 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

Every ~86 days

Total

4

Last Release

3729d ago

Major Versions

0.6.1 → 1.0.32016-02-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/a95b646ba064f3d76b92794dd66fa23b35e5cb4e21081b508d02ca974d003aae?d=identicon)[korvinko](/maintainers/korvinko)

---

Top Contributors

[![sl4mmer](https://avatars.githubusercontent.com/u/1143307?v=4)](https://github.com/sl4mmer "sl4mmer (30 commits)")[![FZambia](https://avatars.githubusercontent.com/u/1196565?v=4)](https://github.com/FZambia "FZambia (10 commits)")[![korvinko](https://avatars.githubusercontent.com/u/2064465?v=4)](https://github.com/korvinko "korvinko (4 commits)")[![Vovan-VE](https://avatars.githubusercontent.com/u/1166581?v=4)](https://github.com/Vovan-VE "Vovan-VE (2 commits)")[![aleksraiden](https://avatars.githubusercontent.com/u/65920?v=4)](https://github.com/aleksraiden "aleksraiden (1 commits)")[![yagobski](https://avatars.githubusercontent.com/u/220980?v=4)](https://github.com/yagobski "yagobski (1 commits)")

---

Tags

centrifugo

### Embed Badge

![Health badge](/badges/erp-mgroen-phpcent/health.svg)

```
[![Health](https://phpackages.com/badges/erp-mgroen-phpcent/health.svg)](https://phpackages.com/packages/erp-mgroen-phpcent)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48247.0M384](/packages/php-http-curl-client)

PHPackages © 2026

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