api rudimentär

This commit is contained in:
Göran Heinemann 2020-03-17 08:00:53 +01:00
parent 42d863bc29
commit a055baf104

9
html/api/index.php Normal file
View File

@ -0,0 +1,9 @@
<?php
include "../../config.php";
$sql = "SELECT content FROM scans where id=(SELECT max(id) FROM scans where site=7)";
$stmt = $pdo->query($sql);
header('Content-type: application/json');
echo $stmt->fetchAll(PDO::FETCH_ASSOC)[0]['content'];