licensing for php




Installs: 59

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 30


v2.0.3 2017-02-02 08:17 UTC

This package is not auto-updated.

Last update: 2020-06-26 19:59:40 UTC


What is PADL?

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


See the PADL Site.


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 .

It was updated to PHP 5.2,5.3 by Raphael Goulart (

And later modified to use composer by me

You can find more about the original author in:


Instance of License
- useMcrypt
- useTime
- useServer
- allowLocal
$padl = new Padl\License(true, true, true, true);

//For better security injecting a copy of $_SERVER global var
$server_array = $_SERVER;

$date_expire = '12/31/2011';
list($month, $day, $year) = explode($date_expire);
// Calculating the time offset (expire_in)
$now       = mktime(date('H'), date('i'), date('s'), date('m'), date('d') , date('Y'));
$dateLimit = mktime(23, 59, 59, $month, $day, $year);
$expireIn  = $dateLimit - $now;

// Generating a key with your server details
$license = $padl->generate('localhost', 0, $expire_in);

// Save the license anywhere, database, filesystem, even remotely


Instance of License
parameters used in this sample:
- useMcrypt  = false 
- useTime    = true
- useServer  = false
- allowLocal = true
$padl = new PadlLicense(true, true, true, true);

// For better security injecting a copy of $_SERVER global var
$server_array = $_SERVER;

// get the license from a form, or load from database, filesystem
$license = (... load the license ...);

// the set key is the key validated
$results = $padl->validate($license);