Validation of existing activations
Esta página aún no está disponible en tu idioma.
Online validation gives you remote control options over activation: your application once activated can regularly check the validity of the activation through the Internet. Moreover, you have the possibility to communicate additional information to your workbook application and to exploit it in your VBA code.
Enable online validation
Section titled “Enable online validation”- In XLS Padlock, choose Online Validation:

In the Base Validation URL field, enter the URL to the “xlspadlock-onlineact” folder (see Base URL for activation) on your web server followed by /dovalidation (do not put a final slash /).
For instance, if the URL to access your xlspadlock-onlineact folder on the server is http://activation.mydomain.com, the base URL to enter is: http://activation.mydomain.com/dovalidation
Choose the frequency of the validation process and what should occur if validation fails.
Secure token and validation process
Section titled “Secure token and validation process”The PHP code that should determine whether the validation is successful or not is available in the MainController.php file available in the inc/app/controllers subfolder (xlspadlock-onlineact / inc / app / controllers).
The default behavior is to allow any validation. Thus, this behavior must be changed according to your needs. To do so, the following function’s code must be customized in the MainController.php file:
function dovalidation($f3)When a user activates the application, the latter receives a security token from the web application that is unique and specific to the user. Normally you need to customize the web application so that this security token is directly linked to a database record, for example, so that you can quickly associate the user with that information stored in your database. This is explained in the getactivation() function of MainController.php (near line 62), where $sec_token is created from the activation key.
The workbook application will store this security token on the user’s computer and return it to the web application during the validation process. Thus, you will be able to identify the customer thanks to this security token and retrieve the record associated with the customer in your database.
Modify the dovalidation() function in the MainController.php file (near line 105) according to your needs.
Pass custom data from the web application to the workbook application
Section titled “Pass custom data from the web application to the workbook application”It is possible to pass additional information from the web application to the workbook application and process it with VBA. For instance, you can pass information about the subscription a user is on (how many days left on the current subscription, etc).
Modify the $additionalvaldata variable in the dovalidation() function in the MainController.php file (near line 111) according to your needs:
$additionalvaldata = "Anything you want to pass to the workbook application (custom license info, etc)";The contents of that variable is sent to the workbook application and it will be made available through the following VBA code snippet:
Public Function ReturnValidationAdditionalServerData()
Dim XLSPadlock As Object
On Error GoTo Err
Set XLSPadlock = Application.COMAddIns("GXLSForm.GXLSFormula").Object
ReturnValidationAdditionalServerData = XLSPadlock.PLEvalVar("ValidationAddServerData")
Exit Function
Err:
ReturnValidationAdditionalServerData = ""
End FunctionFor instance, the following VBA code shows the custom additional data we send by default in a cell:
Private Sub Workbook_Open()
ThisWorkbook.ActiveSheet.Range("B6").Value = ReturnValidationAdditionalServerData
End Sub
The information is therefore refreshed at each validation.