nddcoder/php-offline-license

0.0.1 2020-12-20 04:08 UTC

This package is auto-updated.

Last update: 2024-10-20 12:37:12 UTC


README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via composer:

composer require nddcoder/php-offline-license

Basic Usage

$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

Generate license with expire time

$phpOfflineLicense->generate(time() + 86400); //license expire time after 1 day

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.