PHP code example of fly304625 / sentry-php

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

    

fly304625 / sentry-php example snippets



Raven_Autoloader::register();

// Instantiate a new client with a compatible DSN and install built-in
// handlers
$sentryClient = new Raven_Client('https://e9ebbd88548a441288393c457ec90441:[email protected]/3235');
$sentryClient->install();

// Capture an exception
$event_id = $sentryClient->captureException($ex);

// Give the user feedback
echo "Sorry, there was an error!";
echo "Your reference ID is " . $event_id;