Integration Guides & Client SDKs
MarketingKro provides tamper-proof RSA-SHA256 signature verification libraries for PHP, Laravel, and Node.js.
1. PHP Integration (Vanilla / WordPress / CodeIgniter)
<?php
require_once __DIR__ . '/sdks/php/LicenseClient.php';
use MarketingKro\LicenseClient;
$client = new LicenseClient([
'license_key' => 'MKRO-XXXX-XXXX-XXXX-XXXX',
'product' => 'My PHP Application',
'api_url' => 'https://key.marketingkro.online/api/v1',
'verify_interval' => 86400, // 24h caching
'grace_period' => 259200 // 72h offline grace period
]);
// Halts execution and displays the professional error screen if invalid
$client->enforce();
?>
2. Laravel Middleware Integration
// In routes/web.php:
Route::middleware(['web', 'license'])->group(function () {
Route::get('/dashboard', [DashboardController::class, 'index']);
});
// In .env:
LICENSE_API_URL=https://key.marketingkro.online/api/v1
LICENSE_KEY=MKRO-XXXX-XXXX-XXXX-XXXX
LICENSE_PRODUCT="My Laravel App"
3. Node.js Express Middleware Integration
const express = require('express');
const { createLicenseMiddleware } = require('./sdks/nodejs/middleware');
const app = express();
app.use(createLicenseMiddleware({
licenseKey: process.env.LICENSE_KEY,
product: 'My Node.js Application',
apiUrl: 'https://key.marketingkro.online/api/v1'
}));