Download the PHP package rapid7/r7insight_php without Composer

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

r7insight_php

With these simple steps you can send your PHP application logs to the Insight Platform.

Insight Platform Setup

Once you have made your account on the Insight platform, log in and use the "Quick Add" option in the "Add data" page to add a new log, using the Token TCP option.

The Log Token and data endpoint will be displayed.
The Log Token is a unique identifier for the log allowing for write-only access. Take note of these.

Composer install

This package is also available on Composer.

You can install this package by doing the following:

Parameter Setup

Inside the r7insight_php folder, open r7insight.php and fill in the LOG_TOKEN parameter.

LOG_TOKEN is the token you copied earlier from the Insight Platform UI, and associates that logger with the log in Insight Platform.

In the REGION field, enter the region code - e.g. us, eu, ca, au etc.

You can also supply both of these by the use of environment variables with the same name -- LOG_TOKEN and REGION.

Adding a Custom Host Name and Host ID sent in your PHP log events

To set a custom Host Name that will appear in your PHP log events as Key / Value pairs:

Inside the r7insight_php folder, open r7insight.php and fill in the parameters as follows:

$HOST_NAME_ENABLED = true;

$HOST_NAME = "Custom_host_name_here";

$HOST_ID = "Custom_ID_here_12345";

The $HOST_NAME constant can be left as an empty string, and the library will automatically attempt to assign a host name from your local host machine and use that as the custom host name.

To set a custom Host ID that will appear in your PHP log events as Key / Value pairs: Enter a value instead of the empty string in $HOST_ID = "";
If no $HOST_ID is set and the empty string is left unaltered, no Host ID or Key / Value pairing will appear in your PHP logs.

If you want to send log events in JSON format, then set the $USE_JSON field to true. If you set it to false, then the logs will be sent in KVP (Key Value Pair) format.

Code Setup

Now you need to download/clone the library from GitHub and place the folder in your apps directory.

To use it in your code, enter the following lines, making changes accordingly if you place it in a different location.


All versions of r7insight_php with dependencies

PHP Build Version
Package Version
No informations.
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 rapid7/r7insight_php contains the following files

Loading the files please wait ....