1. Go to this page and download the library: Download maludb/client 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/ */
maludb / client example snippets
use MaluDB\Client;
would default pg's PDO to TCP+localhost which
// then t::fromDsn(
"postgresql:///mydb?host=/var/run/postgresql",
);
$sp = $client->registerSourcePackage(
sourceType: 'log',
contentText: 'oncall: 14:22Z api-gateway 5xx burst',
originJsonb: ['uri' => 'log://oncall/2026-05-13'],
);
$c1 = $client->registerClaim(
subject: 'api_gateway',
verb: 'observed',
objectValue: '5xx_burst',
statementText: 'Initial 5xx surge at 14:22Z',
sourcePackageId: $sp,
);
foreach ($client->retrieve('api_gateway', null, null, null, null, null, 10) as $hit) {
echo "$hit->objectType {$hit->objectId} {$hit->rank}\n";
}