1. Go to this page and download the library: Download tecnozt/proteczt-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/ */
tecnozt / proteczt-client example snippets
use Tecnozt\Proteczt\Http\Middleware\CheckProtecztLicense;
->withMiddleware(function (Middleware $middleware) {
// Apply to all web routes:
$middleware->append(CheckProtecztLicense::class);
// Or apply only to specific route groups (recommended):
$middleware->alias([
'proteczt' => CheckProtecztLicense::class,
]);
})
use Tecnozt\Proteczt\Facades\Proteczt;
// Check if license is active
if (Proteczt::isActive()) {
// proceed
}
// Get full status with data
$status = Proteczt::checkStatus();
// $status['active'] → bool
// $status['data'] → array|null (app info from server)
// $status['fail_open'] → bool (true if server was unreachable)
// Force refresh
Proteczt::refreshStatus();
// Register (usually automatic)
Proteczt::register();