1. Go to this page and download the library: Download n-coders-dev/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/ */
n-coders-dev / 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);
}