PHPackages                             rafaelgou/padl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rafaelgou/padl

ActiveProject[Utility &amp; Helpers](/categories/utility)

rafaelgou/padl
==============

PHP Aplication Distribution Licensing

v1.1.1(9y ago)3443229[1 PRs](https://github.com/rafaelgou/padl/pulls)LGPL

Since Sep 3Pushed 9y ago6 watchersCompare

[ Source](https://github.com/rafaelgou/padl)[ Packagist](https://packagist.org/packages/rafaelgou/padl)[ RSS](/packages/rafaelgou-padl/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

PHP Aplication Distribution Licensing
=====================================

[](#php-aplication-distribution-licensing)

What is PADL
------------

[](#what-is-padl)

A class to generate and validate licenses for a domain, restricting an expire date.

Demo and API
------------

[](#demo-and-api)

- [PADL Demo](http://padl.rgou.net)
- [PADL API](docs/README.md)

History
-------

[](#history)

PADL is a originaly written in 2005 by Oliver Lillie under older PHP4, parked on PHPCLASSES site. You can find the original code as part as this distribution or directelly in [PHP-Generate-PHP-application-license-keys](http://www.phpclasses.org/package/2298-PHP-Generate-PHP-application-license-keys.html).

You can see a quote about:

```
There are several solutions to help developers protecting the PHP software
of applications that they want to sell.

Usually the developers provide license keys with their software
that include information about the licensed code, enabled features,
authorized configuration of the environment on which it is being installed.

This helps the developers to limit the scope of usage of their
software according to the type of software license that their clients purchase.

This way the developers can use the same software distribution
for different configurations and prices and even trial versions.

This class provides a means to generate license keys that include encrypted
information about the clients PHP environment and even a way to send the keys
to the developers site so they can capture the client features and generate
upgraded keys that can enable more features for clients that pay the upgrade price.

Manuel Lemos (PHPCLASSES manteiner)

```

When I need to licence a PHP project, found this class and as it was so well written, it was very easy to update it to PH 5.2 and 5.3.

You can find more about the original author in:

- [PHP CLASSES: Classes of Oliver Lillie](http://www.phpclasses.org/browse/author/122732.html)
- [PHP CLASSES: Professional profile of Oliver Lillie](http://www.phpclasses.org/professionals/profile/9072/)
- Otherwise a lot of modifications has been made, all core methods and examples are or just a copy or strongly based on the original project.

TODO
----

[](#todo)

A validator server is not yet implemented - code was not converted to PHP 5.2 and 5.3 - but in fact it could be done very easily with a webservice.

Instaling
---------

[](#instaling)

```
composer require rafaelgou/padl
```

Usage
-----

[](#usage)

On `examples` directory there are a many examples of basic usage. Run the examples under a web server.

To test under a localhost, use the parameter *allowLocal=True*.

To generate and validate the license the code *MUST BE* and *MUST RUN*under the domain to be validated.

You can store the license in a file, database, or even remotely.

### Generate

[](#generate)

```
