<?php
header('Content-Type: application/json');

$db = new SQLite3(__DIR__ . '/.db.db');
$result = $db->query("SELECT * FROM dns");

$dnsList = [];
while ($row = $result->fetchArray(SQLITE3_ASSOC)) {
    $dnsList[] = $row['url'];
}

$db->close();
echo json_encode($dnsList);
?>
