1. Go to this page and download the library: Download dbtlr/php-airbrake library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dbtlr / php-airbrake example snippets
ake\EventHandler::start('[your api key]');
Key = '[your api key]'; // This is $config = new Airbrake\Configuration($apiKey, $options);
$client = new Airbrake\Client($config);
// Send just an error message
$client->notifyOnError('My error message');
// Send an exception that may have been generated or caught.
try {
throw new Exception('This is my exception');
} catch (Exception $exception) {
$client->notifyOnException($exception);
}