PHP code example of codin / healthchecks-io

1. Go to this page and download the library: Download codin/healthchecks-io 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/ */

    

codin / healthchecks-io example snippets


$pinger = new Codin\Healthchecks\Ping('0d338dcc-a054-11ec-b909-0242ac120002');
$pinger->start();
try {
    // do some stuff
    $pinger->success();
} catch (Exception $e) {
    $pinger->fail();
}