strtotime($keyData['expiry'])) { $errorMessage = "⛔ Key has expired."; } elseif (isset($keyData['used']) && $keyData['used']) { if ($keyData['device'] !== $deviceId) { $errorMessage = "🚫 Key already used on another device!"; } else { // Store the values in session to pass them to tks.php $_SESSION['paid_key'] = $paidKey; $_SESSION['device_id'] = $deviceId; $_SESSION['expiry'] = $keyData['expiry']; header("Location: tks.html"); // Redirect to tks.php after successful login exit(); } } else { // Mark the key as used and store it in session $keys[$paidKey]['used'] = true; $keys[$paidKey]['device'] = $deviceId; file_put_contents($keysFile, json_encode($keys)); // Store the values in session to pass them to tks.php $_SESSION['paid_key'] = $paidKey; $_SESSION['device_id'] = $deviceId; $_SESSION['expiry'] = $keyData['expiry']; header("Location: tks.html"); // Redirect to tks.php after successful login exit(); } } else { $errorMessage = "❌ Invalid key. Try again!"; } } ?> Secure Login

🔑 Secure Login