Download the PHP package bitsensor/php without Composer

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

logo

BitSensor PHP Plugin

The BitSensor PHP plugin.

BitSensor

Documentation

Gitlab repo

Setup BitSensor

Requirements

Installation

Configuration

Code

JSON

index.php

Sample configuration file:

Documentation

You have the following config options at your disposal:

PHP JSON Value Default Description
mode ("ids"), ("monitoring"), ("off") ("ids") BitSensor pipeline running mode. Default "ids" mode includes process pipeline, false positive detection, auto-blocking. "monitoring" mode excludes auto-blocking while in "off" mode, only logging will be done
ipAddressSrc ("remoteAddr"), ("forwardedFor"), ("manual") ("remoteAddr") Source of the IP address of the user.
ipAddress ip override IP address manual override value.
hostSrc ("serverName"), ("hostHeader"), ("manual") ("serverName") Source of the hostname.
host host address override Hostname manual override value.
logLevel ("all"), ("none") ("all") The logging level.
outputFlushing ("on"), ("off") ("off") Output flushing. Turning this on allows the browser to render the page while BitSensor is still working in the background.
uopzHook ("on"), ("off") ("on") Uopz Hooking. Turning this on enables BitSensor to hook into function calls.
executeFastCgi ("on"), ("off") ("off") Finish request to your FastCGI webserver, while processing BitSensor in a separate thread.

Connector Types

Api

PHP JSON Value Default Description
user username Your BitSensor username.
apikey api key Your BitSensor API key.
host hostname {user}.bitsensor.io Hostname of the BitSensor endpoint.
port port 8080 Port of the BitSensor endpoint.

File

PHP JSON Value Default Description
filename File to write to /var/log/bitsensor-datapoints-php.log Logfile that is appended to. Make sure that the Apache or Nginx user can write to this file. Set this using touch /var/log/bitsensor-datapoints-php.log; chown www-data /var/log/bitsensor-datapoints-php.log; chmod 200 /var/log/bitsensor-datapoints-php.log

Blocking Actions

Blockingpage

PHP JSON Value Default Description
user username Your BitSensor username.
host hostname {user}.bitsensor.io Hostname of the BitSensor endpoint.
port port 2080 Port of the BitSensor endpoint.

Query tracing

To use PDO and MySQLi query tracing, the uopz pecl extension must be installed.

Logging

Monolog

Tags

If you are running many applications, it might be sensible to group them by a tag. You can create a tag using the following snippet:

WebSocket

If you are using websockets, BitSensor needs to know in order to properly detect attacks.

Apache

After sinking BitSensor hooks in your application, you can extend BitSensor's visibility to include Apache events that aren't processed by your application.

To log Apache errors add the following to your .htaccess:

Debugging

For more extensive debugging in your codebase, we provide the following hooks:

Debug logging can be printed using BitSensor\Util\Log::d($msg), this will only be printed when running in debug mode, activated by setting:

This should be done in a test script and not in the actual source.

External dependencies

Libraries not managed by Composer should go in the lib/ folder.


All versions of php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
google/protobuf Version ^v3.6.1
psr/log Version ^1.0.2
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 bitsensor/php contains the following files

Loading the files please wait ....