базовая структура проекта создана
This commit is contained in:
6
public/api.php
Normal file
6
public/api.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
require_once '../config.php';
|
||||
$db = new PDO("sqlite:../db/dns.sqlite");
|
||||
|
||||
$topDomains = $db->query("SELECT domain, COUNT(*) as hits FROM logs GROUP BY domain ORDER BY hits DESC LIMIT 10")->fetchAll(PDO::FETCH_ASSOC);
|
||||
echo json_encode($topDomains);
|
||||
0
public/assets/chart.js
Normal file
0
public/assets/chart.js
Normal file
0
public/index.php
Normal file
0
public/index.php
Normal file
Reference in New Issue
Block a user