public function getConnection() { return $this->connection; }
/** * Update license status */ private function updateLicenseStatus($licenseId, $status) { $sql = "UPDATE licenses SET status = :status WHERE id = :id"; $stmt = $this->db->prepare($sql); $stmt->execute([ ':status' => $status, ':id' => $licenseId ]); } php license key system github
/** * Get license by key */ private function getLicense($licenseKey) { $sql = "SELECT * FROM licenses WHERE license_key = :license_key"; $stmt = $this->db->prepare($sql); $stmt->execute([':license_key' => $licenseKey]); return $stmt->fetch(); } public function getConnection() { return $this->
if (empty($data['license_key'])) { http_response_code(400); echo json_encode(['error' => 'License key is required']); exit; } $stmt = $this->