access-watch/access-watch

This package is abandoned and no longer maintained. No replacement package was suggested.

A PHP library to log and analyse HTTP traffic using the Access Watch cloud service.

2.2.3 2017-02-24 23:26 UTC

This package is not auto-updated.

Last update: 2020-01-24 16:08:53 UTC


README

A PHP library to log and analyse HTTP requests using the Access Watch cloud service.

Based on the more generic Bouncer library.

Installation

Install the latest version with

$ composer require access-watch/access-watch

Basic Usage

Start Access Watch as soon as possible in your codebase.

You will need an API key for it.

To get an API key, send us an email at api@access.watch and we will come back to you.

<?php

use \AccessWatch\AccessWatch;

$accessWatch = new AccessWatch(array(
  'apiKey' => 'ACCESS_WATCH_API_KEY_HERE',
));

$accessWatch->start();

Cache

Out of the basic logging scenario, to properly operate, a cache backend needs to be defined. If no cache is set, the library will try to use APC/APCu.

Check the documentation of the Bouncer library for more information about caching.

<?php

use \AccessWatch\AccessWatch;

$memcache = new Memcache();
$memcache->addServer('localhost');

$accessWatch = new AccessWatch(array(
  'apiKey' => 'ACCESS_WATCH_API_KEY_HERE',
  'cache' => new \Bouncer\Cache\Memcache($memcache)
));

$accessWatch->start();

Author

François Hodierne - francois@access.watch - http://access.watch/

License

The Access Watch PHP library is licensed under the MIT License - see the LICENSE file for details