PHP code example of nddcoder / php-offline-license
1. Go to this page and download the library: Download nddcoder/php-offline-license 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/ */
nddcoder / php-offline-license example snippets
$phpOfflineLicense = new Nddcoder\PhpOfflineLicense::create('secret');
$license = $phpOfflineLicense->generate(); //uuid like string
$licenseInfo = $phpOfflineLicense->getInfo($license); //LicenseInfo object
$isValid = $phpOfflineLicense->validate($license);//true or false
$phpOfflineLicense->generate(time() + 86400); //license expire time after 1 day
bash
composer