1. Go to this page and download the library: Download psecio/canary 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/ */
psecio / canary example snippets
$_POST = [
'username' => '[email protected]',
'password' => 'sup3rs3cr3t'
];
\Psecio\Canary\Instance::build()->if('username', '[email protected]')->execute();
// Or you can set multiple match values to look for with an array
$matches = [
'username' => '[email protected]',
'password' => 'sup3rs3cr3t'
];
\Psecio\Canary\Instance::build()->if($matches)->execute();
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
g = new Logger('name');
$log->pushHandler(new StreamHandler('/tmp/mylog.log', Logger::WARNING));
\Psecio\Canary\Instance::build()
->if('username', '[email protected]')
->then($log)
->execute();
$pager = new \PagerDuty\Event();
$pager->setServiceKey('[.... your service ID ....]');
\Psecio\Canary\Instance::build($config)->if('username', '[email protected]')->then($pager);