Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dangdungcntt/php-offline-license
https://github.com/dangdungcntt/php-offline-license
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dangdungcntt/php-offline-license
- Owner: dangdungcntt
- License: mit
- Created: 2020-12-20T03:18:58.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-20T04:20:59.000Z (about 4 years ago)
- Last Synced: 2024-06-15T03:27:06.621Z (7 months ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
#
[![Latest Version on Packagist](https://img.shields.io/packagist/v/nddcoder/php-offline-license.svg?style=flat-square)](https://packagist.org/packages/nddcoder/php-offline-license)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/dangdungcntt/php-offline-license/run-tests?label=tests)](https://github.com/nddcoder/php-offline-license/actions?query=workflow%3ATests+branch%3Amaster)
[![Total Downloads](https://img.shields.io/packagist/dt/nddcoder/php-offline-license.svg?style=flat-square)](https://packagist.org/packages/nddcoder/php-offline-license)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:
```bash
composer require nddcoder/php-offline-license
```## Basic Usage
```php
$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
```php
$phpOfflineLicense->generate(time() + 86400); //license expire time after 1 day
```## Testing
```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Dung Nguyen Dang](https://github.com/dangdungcntt)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.