Example #1
0
 */
if (empty($_POST)) {
    echo '<link rel="stylesheet" type="text/css" href="../shared/styles.css">';
    echo '<body>' . "\r\n";
    echo '<span class="header">' . "\r\n";
    echo '<b>########################################################################</b><br />' . "\r\n";
    echo '<b>Recieve Call Demonstration File</b><br />' . "\r\n";
    echo 'This file validates a call from a remote client server and validates the lisence key from the<br />' . "\r\n";
    echo 'client. It thens returns the result of the database check and comparison to the client server.<br />' . "\r\n";
    echo 'This file is only used from a remote socket opening.<br />' . "\r\n";
    echo '<span style="font-size: 10;">' . "\r\n";
    echo '<b>Oliver Lillie, buggedcom [publicmail at buggedcom dot co dot uk]<br />' . "\r\n";
    echo '<a href="http://www.buggedcom.co.uk/" target="_blank" style="color: #F00">http://www.buggedcom.co.uk/</a></b><br />' . "\r\n";
    echo '</span>' . "\r\n";
    echo '<b>########################################################################</b><br /><br />' . "\r\n";
    echo '</span>' . "\r\n";
    echo '<body>' . "\r\n";
} else {
    # import db cofigs
    include_once 'db.config.php';
    # import the classes
    include_once '../shared/class.license.lib.php';
    include_once 'class.license.server.php';
    # initialise the class using neither server or time checking and set the use
    # of mcrypt according to the recieved data
    $server = new license_server($_POST['MCRYPT'], false, true, true);
    # recieve the call from client server
    # and return the results to the client server by echoing back the
    # returned data to the socket call
    die($server->recieve_call($_POST['POSTDATA'], $table, $user, $pass));
}
Example #2
0
    echo '<span style="font-size: 10;">' . "\r\n";
    echo '<b>Oliver Lillie, buggedcom [publicmail at buggedcom dot co dot uk]<br />' . "\r\n";
    echo '<a href="http://www.buggedcom.co.uk/" target="_blank" style="color: #F00">http://www.buggedcom.co.uk/</a></b><br />' . "\r\n";
    echo '</span>' . "\r\n";
    echo '<b>########################################################################</b><br /><br />' . "\r\n";
    echo '</span>' . "\r\n";
    echo '<body>' . "\r\n";
} else {
    # import db cofigs
    include_once 'db.config.php';
    # import the classes
    include_once '../shared/class.license.lib.php';
    include_once 'class.license.server.php';
    # initialise the class using neither server or time checking and set the use
    # of mcrypt according to the recieved data
    $server = new license_server($_POST['MCRYPT'], true, true, true);
    # set the approval type
    # this determines if the key is automatically returned or if admin is required to
    # approve it. NOTE that is a key code is used, this overrides admin approval
    # the key code is a code generated by the server when a license is purchased
    # and links to a specific entry in the database.
    # this example requires admin approval to generate the full license, but generates
    # a temp license valid for 48 hours and binds the MAX_UPLOADS to 5 meaning that
    # the MAX_UPLOADS var could be used by the program to restrict the number of items
    # You should also note that this MAX_UPLOADS overrides the MAX_UPLOADS set in the
    # request demo file.
    # untill a full license key is approved
    $server->set_approval_type('ADMIN', array('TYPE' => 'Temporary Key', 'MAX_UPLOADS' => 5), 60 * 60 * 24 * 2);
    # recieve the call from client server
    # return the data by echoing back the returned info
    die($server->receive_install($_POST['POSTDATA'], $table, $user, $pass));