PHPackages                             broadcastt/broadcastt-php-http - 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. broadcastt/broadcastt-php-http

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

broadcastt/broadcastt-php-http
==============================

PHP library for Broadcastt HTTP API

v0.4.5(3y ago)12.0k↓80%1[1 issues](https://github.com/broadcastt/broadcastt-php-http/issues)1MITPHPPHP ^7.3 || ^8.0CI failing

Since Mar 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/broadcastt/broadcastt-php-http)[ Packagist](https://packagist.org/packages/broadcastt/broadcastt-php-http)[ Docs](https://broadcastt.xyz/)[ RSS](/packages/broadcastt-broadcastt-php-http/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (4)Versions (12)Used By (1)

Broadcastt
==========

[](#broadcastt)

[![](https://camo.githubusercontent.com/3e56b542d7de1be77294a6755fcd343ddab38f1eda0d70a228079be8d2ff7198/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f62726f616463617374742f62726f616463617374742d7068702d687474702f546573743f7374796c653d666c61742d737175617265)](https://github.com/broadcastt/broadcastt-php-http/actions?query=workflow%3ATest)[![codecov](https://camo.githubusercontent.com/a2b36282b7eaedf890f458b05549c5d592154579203aaea7d35c1266f5fe03af/68747470733a2f2f636f6465636f762e696f2f67682f62726f616463617374742f62726f616463617374742d7068702d687474702f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/broadcastt/broadcastt-php-http)[![](https://camo.githubusercontent.com/ea297dd3679b65a8cc5175f74dfd875678f539ef4376586573f50ee5d82ae673/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f62726f616463617374742f62726f616463617374742d7068702d687474703f7374796c653d666c61742d737175617265)](https://github.com/broadcastt/broadcastt-php-http/blob/main/LICENSE)[![](https://camo.githubusercontent.com/d05a9ecf1a56126c51aac28d05a39360acce87e860527b470fd08f14455951d2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62726f616463617374742f62726f616463617374742d7068702d687474703f7374796c653d666c61742d737175617265)](https://packagist.org/packages/broadcastt/broadcastt-php-http)

Realtime web applications are the future. [Broadcastt](https://broadcastt.xyz/) provides tools to help developers create realtime applications.

PHP HTTP Library
----------------

[](#php-http-library)

> Be aware that this library is still in beta and not reached the first MAJOR version.
>
> Semantic Versioning 2.0.0
>
> Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.

This library is compatible with PHP 7.1+

This is a PHP library to interact with the Broadcastt API. If you are looking for a client library or a different server library please check out our [list of libraries](https://broadcastt.xyz/docs/Libraries).

For tutorials and more in-depth documentation, visit the [official site](https://broadcastt.xyz/).

Documentation
-------------

[](#documentation)

- [First steps](#first-steps)
- [Configuration](#configuration)
- [Modifiers](#modifiers)
- [Helpers](#helpers)
- [Usage](#usage)
- [Contributing](#contributing)

### First steps

[](#first-steps)

Require this package, with [Composer](https://getcomposer.org/)

```
composer require broadcastt/broadcastt-php-http

```

### Configuration

[](#configuration)

```
$appId = 'YOUR_APP_ID';
$appKey = 'YOUR_APP_KEY';
$appSecret = 'YOUR_APP_SECRET';
$appCluster = 'YOUR_APP_CLUSTER';

$client = new Broadcastt\BroadcasttClient( $appId, $appKey, $appSecret, $appCluster );
// or
$client = Broadcastt\BroadcasttClient::fromUri("http://{$appKey}:{$appSecret}@{$appCluster}.broadcastt.xyz/apps/{$appId}");
```

#### `appId` (Integer)

[](#appid-integer)

The id of the application

#### `appKey` (String)

[](#appkey-string)

The key of the application

#### `appSecret` (String)

[](#appsecret-string)

The secret of the application

#### `appCluster` (String) Optional

[](#appcluster-string-optional)

The cluster of the application

Default value: `eu`

### Modifiers

[](#modifiers)

#### `scheme` (String)

[](#scheme-string)

E.g. http or https

Default value: `http`

#### `host` (String)

[](#host-string)

The host e.g. cluster.broadcastt.xyz. No trailing forward slash

Default value: `eu.broadcasttapp.xyz` If the cluster is not set during initialization

#### `port` (String)

[](#port-string)

The http port

Default value: `80`

#### `basePath` (String)

[](#basepath-string)

The base of the path what the request will call. `{appId}` can be used to automatically parse the app ID in the base path.

Default value: `/apps/{appId}`

#### `timeout` (String)

[](#timeout-string)

The http timeout

Default value: `30`

#### `guzzleClient` (Mixed\[\])

[](#guzzleclient-mixed)

Guzzle Client for sending HTTP requests

If not set it will be initialized without any parameters on the first request

### Helpers

[](#helpers)

#### `fromUri($uri)`

[](#fromuriuri)

Instantiate a new client from the given uri.

These are methods which help you modify the instance

#### `useCluster($cluster)`

[](#useclustercluster)

Modifies the `host` value for given `cluster`

#### `encrypted()`

[](#encrypted)

Short way to change `scheme` to `https` and `port` to `443`

### Usage

[](#usage)

#### `trigger($channels, $name, $data, $socketId = null, $jsonEncoded = false)`

[](#triggerchannels-name-data-socketid--null-jsonencoded--false)

Trigger an event by providing event name and payload.

Optionally provide a socket ID to exclude a client (most likely the sender).

#### `triggerBatch($batch = [], $encoded = false)`

[](#triggerbatchbatch---encoded--false)

Trigger multiple events at the same time.

#### `get($path, $params = [])`

[](#getpath-params--)

GET arbitrary REST API resource using a synchronous http client.

All request signing is handled automatically.

Contributing
------------

[](#contributing)

Everyone is welcome who would help to make this library "Harder, Better, Faster, Stronger".

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~160 days

Recently: every ~205 days

Total

10

Last Release

1164d ago

PHP version history (3 changes)0.1.0PHP ^5.4 || ^7.0

0.2.0PHP ^7.1

v0.4.1PHP ^7.3 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![nerg4l](https://avatars.githubusercontent.com/u/4079392?v=4)](https://github.com/nerg4l "nerg4l (45 commits)")

---

Tags

eventsmessagingphpreal-timerealtimeresttriggerrestpusheventsreal-timepublishmessagingrealtimetriggerBroadcastbroadcastt

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/broadcastt-broadcastt-php-http/health.svg)

```
[![Health](https://phpackages.com/badges/broadcastt-broadcastt-php-http/health.svg)](https://phpackages.com/packages/broadcastt-broadcastt-php-http)
```

###  Alternatives

[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[pusher/pusher-http-laravel

\[DEPRECATED\] A Pusher bridge for Laravel

400509.0k3](/packages/pusher-pusher-http-laravel)[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[zfr/zfr-pusher

PHP library for interacting with the Pusher REST API

2112.7k1](/packages/zfr-zfr-pusher)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[ory/hydra-client

Documentation for all of Ory Hydra's APIs.

17435.9k](/packages/ory-hydra-client)

PHPackages © 2026

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