PHP code example of error-tracker / php-sdk

1. Go to this page and download the library: Download error-tracker/php-sdk 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/ */

    

error-tracker / php-sdk example snippets


use ErrorTracker\Client;

$client = new Client('APP_KEY');

$client->report([
    'name' => 'The error name',
    'text' => 'A message about the error'
]);

use ErrorTracker\Handler;

new Handler('MY_APP_KEY');

$handler = new Handler('MY_APP_KEY');

// Turn off
$handler->enabled = false;

// Turn back on
$handler->enabled = true;

$handler->unregister();
bash
composer