Download the PHP package magium/request-firehose without Composer

On this page you can find all versions of the php package magium/request-firehose. 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 request-firehose

PHP Request Firehose

This library attaches itself to the PHP request and upon request shutdown it will send the request meta data or a log file entry to an adapter, currently Redis or Mongo, where it can be stored, processed or tailed. It is intended for use in clustered systems where multiple machines are serving HTTP requests and, in general, where devops would like to have a centralized place for monitoring or storing requests that can be used alongside other logging tools.

For example, if you wanted to tail and grep the logs for a specific IP address you would deploy the Redis publish code (see below) and run the following command:

To install

To Use

Introduction

Call \Magium\RequestFirehose\RequestFirehose::getInstance() at the earliest convenience in your script. This will typically be immediately after require_once 'vendor/autoload.php';.

Once you have an instance of the firehose you will need to configure an adapter for it. The simples example is with the Filesystem adapter.

That's it! It will register itself as a shutdown function and write to the appropriate adapter after the request has completed.

If you are not using Composer, or are using some other autoloader that is not compatible with PSR-4 you can include the src/include.php file and it will load up all of the source files.

If you are using Redis, MongoDB, or some other adapter that is not part of core PHP you may need to install their client library. Check the composer suggestions for supported clients.

Check out some of the examples in the examples directory. The following examples have been largely copied from there.

Redis

Push (BLPOP)

PubSub (SUBSCRIBE)

PubSub /w Log Output

If you are looking for something you can simply tail and pipe to grep, this might be a good option.

MongoDB

Filesystem

Aggregate

Perhaps there are times when you would like to push the data to Redis so you can tail the logs, but also store the data in Mongo for processing. You can use the Aggregate adapter to do that.


All versions of request-firehose with dependencies

PHP Build Version
Package Version
Requires php Version ^5.5 || ^7.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 magium/request-firehose contains the following files

Loading the files please wait ....