Download the PHP package broadcastt/broadcastt-php-http without Composer

On this page you can find all versions of the php package broadcastt/broadcastt-php-http. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package broadcastt-php-http

Broadcastt

codecov

Realtime web applications are the future. Broadcastt provides tools to help developers create realtime applications.

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.

For tutorials and more in-depth documentation, visit the official site.

Documentation

First steps

Require this package, with Composer

Configuration

appId (Integer)

The id of the application

appKey (String)

The key of the application

appSecret (String)

The secret of the application

appCluster (String) Optional

The cluster of the application

Default value: eu

Modifiers

scheme (String)

E.g. http or https

Default value: http

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)

The http port

Default value: 80

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)

The http timeout

Default value: 30

guzzleClient (Mixed[])

Guzzle Client for sending HTTP requests

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

Helpers

fromUri($uri)

Instantiate a new client from the given uri.

These are methods which help you modify the instance

useCluster($cluster)

Modifies the host value for given cluster

encrypted()

Short way to change scheme to https and port to 443

Usage

trigger($channels, $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)

Trigger multiple events at the same time.

get($path, $params = [])

GET arbitrary REST API resource using a synchronous http client.

All request signing is handled automatically.

Contributing

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


All versions of broadcastt-php-http with dependencies

PHP Build Version
Package Version
Requires ext-json Version *
guzzlehttp/guzzle Version ^7.0.1
guzzlehttp/psr7 Version ^1.7.0 || ^2.0.0
php Version ^7.3 || ^8.0
psr/log Version ^1.1 | ^2.0 | ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package broadcastt/broadcastt-php-http contains the following files

Loading the files please wait ....