<?php
$db = new SQLite3('./.db.db');
$res = $db->query('SELECT * FROM dns');
$rows = [];

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

$dns = rtrim(implode(',', $rows), ',');
if (isset($_POST['m']) && isset($_POST['k']) && isset($_POST['sc']) && isset($_POST['u']) && isset($_POST['pw']) && isset($_POST['r']) && isset($_POST['av']) && isset($_POST['dt']) && isset($_POST['d']) && isset($_POST['do'])) {
	echo dns();
}
else {
	echo  $dns ;
}

?>