Ejemplo n.º 1
0
    // instatiate the class
    $padl = new \Padl\License($useMcrypt, $useTime, $useServer, $allowLocal);

    // copy the server vars (important for security, see note below)
    $server_array = $_SERVER;

    // set the server vars
    // note this doesn't have to be set, however if not all of your app files are encoded
    // then there would be a possibility that the end user could modify the server vars
    // to fit the key thus making it possible to use your app on any domain
    // you should copy your server vars in the first line of your active script so you can
    // use the unmodified copy of the vars
    $padl->setServerVars($server_array);

    // generate a key with your server details
    $license = $padl->generate($domain, 0, $expireIn);
    ?>

        <h2>Used code to generate</h2>
        <pre>
// Register Autoload
require('../vendor/autoload.php');

/*
Instance of License
parameters:
- useMcrypt
- useTime
- useServer
- allowLocal
*/