PHP

Use PHP for this function.

Methods through back-end are completely secure. With this option, you have complete security in your projects.

Remember that you need to complete your software data to adapt it.

function checkLicense($key, $scope) {
	$secret = 'PUT_YOUR_SECRET';
	$url = 'https://license.devbybit.com/api.php?secret=' . $secret . '&type=license&key=' . $key . '&scope=' . $scope;
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	$response = curl_exec($ch);
	$data = json_decode($response, true);
	curl_close($ch);
	return $data;
}

$verify = checkLicense('PUT_YOUR_LICENSE_KEY', 'PUT_YOUR_LICENSE_SCOPE');

if ($verify['valid']) {
  // License is valid
  echo 'Success<br>Custom addons: <br>';
  echo (empty($verify['addons'])) ? 'N/A' : $verify['addons'];
} else {
  // License is invalid
  echo 'Error... Access denied! <br>Type: ' . $verify['message'];
  // exit();
  // return;
}

Need for changes to ensure proper functionality.

Fill in the necessary fields.

PUT_YOUR_SECRET = The secret key of the site to which you will allow access, found in config.php

PUT_YOUR_LICENSE_KEY = A generated license key.

PUT_YOUR_LICENSE_SCOPE = If the use of scope in the license is mandatory, enter the SCOPE set in the key.


Done.

Last updated