'error', 'text' => 'Key is inactive. Please contact @TANMAYPAUL21.']; } elseif ($currentDate > $expiryDate) { $message = ['type' => 'error', 'text' => 'Key expired. BUY FROM @TANMAYPAUL21.']; } elseif (!empty($foundKey['device_id']) && $foundKey['device_id'] !== $deviceId) { $message = ['type' => 'error', 'text' => 'Key is already bound to another device.']; } else { // Valid key: Update the device_id if not already bound if (empty($foundKey['device_id'])) { $foundKey['device_id'] = $deviceId; file_put_contents($keysFile, json_encode($keys, JSON_PRETTY_PRINT)); } // Redirect to tanmay.html after successful login header('Location: tanmay.html'); exit; } } else { $message = ['type' => 'error', 'text' => 'Invalid key. Please try again.']; } } ?>