get('level', 'starter')).'&version='.$config->get('version');
$userInformation = acym_fileGetContent($url, 30);
$warnings = ob_get_clean();
$result = (!empty($warnings) && acym_isDebug()) ? $warnings : '';
if (empty($userInformation) || $userInformation === false) {
echo json_encode(['content' => '
'.acym_translation('ACYM_ERROR_LOAD_FROM_ACYBA').'
'.$result]);
exit;
}
$decodedInformation = json_decode($userInformation, true);
$newConfig = new stdClass();
$newConfig->latestversion = $decodedInformation['latestversion'];
$newConfig->expirationdate = $decodedInformation['expiration'];
$newConfig->lastlicensecheck = time();
$config->save($newConfig);
$headerHelper = acym_get('helper.header');
$myAcyArea = $headerHelper->checkVersionArea();
echo json_encode(['content' => $myAcyArea, 'lastcheck' => acym_date($newConfig->lastlicensecheck, 'Y/m/d H:i')]);
exit;
}
}