<?php
$db = new SQLite3('../api/.db.db');
$res = $db->query('SELECT * FROM test'); 
$rows = array();
$row = $res->fetchArray(SQLITE3_ASSOC);

if ($_GET['action'] == 'version') {
	echo $row['ver'];
}
if ($_GET['action'] == 'apk') {
	header("Location: {$row['apk']}");
}
?>