<?php
header('Content-Type: application/json');
require_once __DIR__ . '/../db.php';

$rows = $pdo->query("SELECT * FROM clients ORDER BY last_seen DESC")->fetchAll();
echo json_encode(["ok"=>true, "clients"=>$rows]);
