AV-SOFT.COM
AVLock SIMPLE
Introduction
What is AVLock SIMPLE?
How to buy AVLock SIMPLE?
License Agreement
Using AVLock Simple
How to install AVLock SIMPLE?
How does AVLock SIMPLE work?
Properties
Methods
Brief practice with Demo's
The Online License Manager (OLM)
The RegMonitor utility
The KeyGen utility
The RegisterIt utility
The CodeCheck utility

The Online License Manager (OLM)

Top  Previous  Next

s31olm

The Online License Manager (OLM) is a interface between the AVLock SIMPLE component and an internet web site. This allow to the AVLock SIMPLE component request from the web server the generation of a registration key, to save it into an online database, and save also another data about the machine and the user into the online database. etc.

 

There are two versions of the Online License Manager (OLM), the basic version and the advanced version. These are sets of php scripts to be installed into your web server in order to manage online licensing functions and are accessible from your application through a set of methods created for this purpose.

 

The basic version is included with the standard edition and the advanced version with the professional and developer editions.  After purchase you will be able to modify and adapt them to your own needs and install them into your own web server.

 

 

THE BASIC VERSION

 

The basic version is made up by three php scripts; basickeymanager.php, checkdate.php and genkeys3lib.php. To install it please create a folder (e.g. '/olm3') under the /public_html directory then copy into these files, also create the /olm3/temp folder in order to hold the key files created from the applications when the users starts its trial periods. 

Then you will have a scheme like this:

 

/public_html

       /olm3  <---- (basickeymanager.php, checkdate.php, genkeys3lib.php)

             /temp

 

 

THE ADVANCED VERSION

 

The advanced version is made up by 7 php scripts plus a javascript file which installed will look like the following scheme:

 

/public_html

       /olm3  <--- genkeys3lib.php

                   basickeymanager.php

                   checkdate.php

                   avlocks3_inc.php

                   advancedkeymanager.php

                   s3cpanel.php

                   s3createtable.php

                   sorttable.js

 

             /temp

 

This set of files allow you to accomplish the whole licensing cycle for your application namely; 1) to start the trial period 2), to extend the trial period if needed, 3) to purchase your application 4) to activate your application by the user, and 5) to move the license to another computer. The Demo1 sample shows how to implement each one of these steps.

 

HOW TO INSTALL THE ADVANCED VERSION INTO YOUR SERVER:

 

The first step is to edit the configuration section into the avlocks3_inc.php file entering your own values as shown below:

 

//*****************CONFIGURATION SECTION************************

$sql_host="localhost";     // Host for the MySql server. Normally localhost

$sql_user="your_username"; // Mysql user name

$sql_pass="xxxxxx";        // Mysql password

$sql_db="your_dbname";     // your MySql database

$sql_table="avlockusers";  // table for the avlock simple data

//**************************************************************

 

Then create the olm3 folder (or any other) under the /public_html folder into your web server and copy into all files of the advanced OLM.

As next step you need to create the database table into your web site, then, supposing you have as domain "mydomain.com" enter from your browser (Internet Explorer, Firefox, etc.) the following URL: http://yourdomain.com/olm3/s3createtable.php  

then you will see the following message "table created successfully",  if so you can remove the s3createtable.php from your server since this will not be used anymore.

 

The records into the table will be added when the users starts the trial periods into his computers. In order to access to this information you will need to use the control panel as explained below.

 

HOW TO USE THE CONTROL PANEL:

 

If you did install the advanced package, then open your browser and enter the following URL: http://yourdomain.com/s3cpanel.php However if you are trying the free component still you may use the package installed in the valega.com site with the following URL: http://valega.com/olm30/s3cpanel.php. Immediately will appear the following screen:

 

cpanel01

 

there are two sections; the header above with a set of fields and operative buttons and below the list of records.

 

Please enter in the header the following data in order to acess to the Demo5 records:

 

AppID [12346 ]  AppName [MyApp    ]    UserName [          ]

 

then press the [-> Go] button.

If you get too much records (this may be possible since several AVlock users would be trying the MyApp name) you would enter some text in the UserName field in order to filter the desired records, then the resulting query will be as follow:

 

SELECT * FROM avlockusers WHERE APPID=12346 AND APPNAME='MyApp' AND USERNAME LIKE '%xxx%'

 

where xxx is the text entered into the UserName field.

If some records matches with the query you will see them into a screen as the image below:

 

cpanel02

 

The records are added when the user start the trial period, then you would ask to the user for his personal data how the Demo1 does in order to complete the field information for the record.

 

The data fields are the following:

 

ID : Unique numeric value to identify the record, generated automatically.

AppID : Numric value matching with the AppID property into the AVLock SIMPLE component into your application.

AppName : Alphanumeric value matching with the AppName property into the AVLock SIMPLE component into your application.

MOD : The module number

Primary : 'Y' for a primary registration. 'N' for secondary.

SUM : InstallCode checksum.

Installcode : Installcode coming from the registered computer.

Primary Installcode : InstallCode coming from the primary computer. For primary records, both, the InstallCode and Primary InstallCode are identical.

Ext : Set Ext=Ý' in order to allow to the user to extend his trial period.

Users : The number of users allowed to share the same license (registration key).

Inst : The number of instances allowed to run at once into the computer.

Days : Authorized days for trial and temporal keys. 65535 (maxword) for permanent keys.

Values : Three hexadecimal characters matching with the Values field into the registration key.

Paid : Set it to 'Y' in order to authorize to the user to activate a new registration key.

Mov : Is set to 'Y' when the user mark it to be moved to another computer using the methods: OnlineMovePrimary1() or OnlineMoveSecondary1().

KeyDate : Date for the Key field.

UserName : User name from Windows.

Company : User company.

UserEmail : User email address.

K (Keytype): Key type 0=Trial, 1=Temporal, 2=Permanent, etc.

Key : Last Saved Key

 

Data edition:

 

For each registered module there will have one or more  records, primary and secondary. Mostly using only the module 0, as we did in the Demo1, to control the application and other options, although for some cases there could be features that you want to control separately, for these cases we suggest to use the module 0 for the main application and other modules to manage extra features. 

 

In order to edit a record, select it clicking on the proper line and the corresponding fields will be copied into the fields above in the header. Then press the appropriate button in order to edit the associated field.

 

The buttons:

 

Delete: Erases the selected record.

Extend [Y] [N]: Sets 'Y' or 'N' to the Extend field in order to allow or disallow to extend the trial period.

Paid [Y] [N]:  Sets 'Y' or 'N' to the Paid field in order to allow or disallow to activate the application.

Moved [Y][N]: Optionally you can Set 'Y' or 'N' to the Moved field in order to denote that the application has been moved or not. A moved application should be considered as disabled.

 

THE PHP SCRIPTS:

 

genkeys3lib.php : Basic functions of key generation. Used in avlock_gensimplekey.php

avlocks3_inc.php : Basic functions of database access. Used for many scripts in the package.

s3createtable.php : Creates the table to contain the online registration data. Once used may be deleted.

s3cpanel.php : The control panel.

basickeymanager.php : Part of the Basic OLM. Generates keys, and saves it into a file into the web server.

advancedkeymanager.php : Generates keys, add/update records with keys and other data posted from the application.  Used with  all methods associated with the OLM. See Demo1 and the METHODS FOR INTERNET ACCESS section.

checkdate.php : Script used to compare the internet date with the local system date. This is used with the OnlineCheckDate()  method in order to verify the local system date.

sorttable.js : Javascript file used for the s3cpanel.php script in order to allow to sort the record by the desired column  clicking on the column title.

 

 

RELATED PROPERTIES AND METHODS:

 

 

There are some properties into the component to hold the OLM path and the names of the most used php scripts, namely:

 

Property

Value

OlmPath

/olm3

OlmAdvScript

advancedkeymanager.php

OlmBasicScript

basickeymanager.php

OlmCheckScript

checkdate.php

 

So, if you change the name of some script, you also will need to change the relating property value.  

 

There are a lot of methods to access to the OLM using each the proper script:

 

Method

Script

OnlineCheckDate()

checkdate.php

OnlineGetKeyB()

basickeymanager.php

OnlineStartTrial()

advancedkeymanager.php

OnlineExtendTrial()

advancedkeymanager.php

OnlineRegisterKey()

advancedkeymanager.php

OnlineRenew()

advancedkeymanager.php

OnLineSynch()

advancedkeymanager.php

OnLineStartSecondary()

advancedkeymanager.php

OnLineMovePrimary1()

advancedkeymanager.php

OnLineMovePrimary2()

advancedkeymanager.php

OnLineRestorePrimary()

advancedkeymanager.php

OnLineMoveSecondary1()

advancedkeymanager.php

OnLineMoveSecondary2()

advancedkeymanager.php

OnLineRestoreSecondary()

advancedkeymanager.php

OnLineRemoveReg()

advancedkeymanager.php

OnlineFullSynch()

advancedkeymanager.php

 

 

 

I tried to make this help file clear, readable and complete, this is my goal, but it is possible that I leave behind some important things that you were expecting. So, if you miss something or have found bugs or have some idea to improve this help, please let me know.

 

 


  Alcides Valega

Author of AVLock SIMPLE