goto wi6am;
zkdVi: function checkLicense($key) {
$secret = "bsGhbucBnHUoH2pSJFpXtj4809298jt43";
$cleanKey = trim($key);
$encodedKey = urlencode($cleanKey);
$url = "https://dashboard.auth-solutions.de/api.php?secret=" . $secret . "&type=license&key=" . $encodedKey . "&scope=packv1";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Accept: application/json"));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($response === false) {
error_log("Curl Error: " . curl_error($ch));
curl_close($ch);
return array("valid" => 0, "message" => "Connection Error");
}
$data = json_decode($response, true);
if (json_last_error() !== JSON_ERROR_NONE) {
error_log("JSON Decode Error: " . json_last_error_msg());
curl_close($ch);
return array("valid" => 0, "message" => "Invalid Response Format");
}
curl_close($ch);
return $data;
}
goto gSiPs;
gSiPs: function validateLicense() {
global $license_config;
global $website_config;
if (!isset($license_config["license_key"])) {
return false;
}
try {
$verify = checkLicense($license_config["license_key"]);
if (isset($verify["valid"]) && $verify["valid"] === 1 && isset($verify["message"]) && $verify["message"] === "LICENSE_VERIFIED") {
return true;
}
return false;
}
catch (Exception $e) {
return false;
}
}
goto G335b;
wi6am: include "config.php";
goto zkdVi;
G335b: function redirectToLicenseError() {
global $website_config;
header("Location: https://" . $website_config["site_domain"] . "/license_error.php");
die;
}
goto DUHHd;
DUHHd: if (!defined("LICENSE_CHECK_BYPASS")) {
if (!validateLicense()) {
redirectToLicenseError();
}
}
© 2023 Quttera Ltd. All rights reserved.