PHP code example of mead-steve / raygun4php

1. Go to this page and download the library: Download mead-steve/raygun4php 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/ */

    

mead-steve / raygun4php example snippets






	$client = \MeadSteve\Raygun4php\RayGun::getClient("{{apikey for your application}}");

	function error_handler($errno, $errstr, $errfile, $errline ) {
		global $client;
  		$client->SendError($errno, $errstr, $errfile, $errline);
	}

	function exception_handler($exception)
	{
		global $client;
		$client->SendException($exception);
	}

	set_exception_handler('exception_handler');
	set_error_handler("error_handler");