Grabs the extra license data from the licensing API server. While this extra meta data is not required, you can use the API call set_data to associate any string of information needed for the license. Create any type of string you want: a normal message, a string of delimited information, or a serialized data set. The size limit of the string is 1024-characters. Examples of data may include:
- Product Code: to determine which product the license will work on; for companies with multiple products!
- Product Level: to segregate application features. (ie.- “Basic” or “Pro” version.)
- A serialized data string holding multiple sets of variables.
- …or anything else you can fit into a 1024-character string!
- code = (string) the end user’s license alias. To get the licensing alias, the activate API call must have been called at least once in the past.
Returns a string containing the license meta data.
Quick PHP Example
GetAlias( ) should be your function that grabs the license alias stored locally.
$params = array( 'call' => 'get_data', 'apikey' => YOUR_API_KEY, 'code' => GetAlias() ); $result = LicenseAPI($params);
Successful Return String
On success, get_data returns the license meta data.
Example of a return string delimited with commas:
Example of a serialized PHP array:
The serialized example above holds an array of many possible product license parameters that a complex license purchase may use, such as:
- Application parameters that are enable (paid for by the user)
- License start dat
- Data license will be finished; if the application has yearly licenses!
- Disabled features.
- …and other parameters.
Unsuccessful Return Strings
If for some erroneous reason the license alias is invalid, the API request will return the exact string “Invalid License”. Naturally, you won’t want to set any license’s meta data to “Invalid License”.