LiSense

LiSense LAAS Integration

One-line license verification for your applications

PHP Integration

1 Installation

Terminal
curl -O https://lisensetech.com/downloads/lisense.zip

2 Implementation

PHP
<?php
// Single-line integration
require_once __DIR__.'/path/to/lisense/laas-client.php';
if (!defined('LAAS_CLIENT_LOADED')) {
    http_response_code(500);
    echo 'laas_client.php was not loaded correctly.';
    exit;
};
// License verification happens automatically
?>

How It Works

  1. Include the client file in your application
  2. Automatic license verification occurs in the background
  3. Invalid licenses redirect to /license-error.php
  4. Valid licenses continue normal code execution

Error Handling

Custom Error Page

license-error.php
<?php
// license-error.php
session_start();
$error = $_SESSION['license_error'] ?? [
    'code' => 'unknown',
    'message' => 'License verification failed'
];
?>
<!-- Your HTML here -->
<div class="error-message">
    <h1>Error: <?= htmlspecialchars($error['code']) ?></h1>
    <p><?= htmlspecialchars($error['message']) ?></p>
    <?php if (isset($error['renewal_url'])): ?>
    <a href="<?= $error['renewal_url'] ?>">Renew License</a>
    <?php endif; ?>
</div>

Standard Error Codes

Code Description
expired License has expired
invalid License code is invalid
tamper_detected Security Alert
unknown License Error
not_found License not registered
deactivated License deactivated by Developer
service_unavailable System maintenance in progress
rate_limit_exceeded Too many verification attempts
connection_failed Could not verify license
Error codes are passed via session variables and can be styled according to your application's design system.

Configuration

Client Options

laas-client.php
class LAAS {
    const API_URL = 'https://api.lisensetech.com/v1/validate.php';
    const LICENSE_CODE = 'YOUR_LICENSE_CODE'; // Set your license here
    const APP_ID = 1; // Your application ID
    const CACHE_TTL = 3600; // Cache duration in seconds
}

Server Requirements

  • PHP 7.4+
  • PDO MySQL extension
  • SSL/TLS for secure connections
  • Session support enabled
Ensuring these requirements are met will guarantee smooth operation of the licensing system.

API Sandbox

About This Sandbox

Test different license scenarios without affecting your production environment. This sandbox simulates API responses for development and debugging purposes.

API Response
{
  "status": "Select a scenario to test"
}

Quick Start

1

Download

Download the laas-client.php file

2

Include

Include it in your application code lisense/laas-client.php

3

Configure

Set your license code in the client file

4

Error Page

Create license-error.php file