www/getnodes.php

Fri, 10 Aug 2018 16:52:57 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 10 Aug 2018 16:52:57 +0200
changeset 6
366f270a2446
parent 2
282e7d2bb28a
child 7
59048cd5f00d
permissions
-rw-r--r--

Nodes auto refresh added.

<?php

require_once('config.php');

$mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME);
$result = $mysqli->query("SELECT uuid,node,online,net_address FROM nodes");
//Copy result into a associative array
$resultArray = $result->fetch_all(MYSQLI_ASSOC);
echo json_encode($resultArray);

mercurial