]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blob - api/overview.php
Close session early in the api/overview.php so it doesn't block other pages.
[irc/unrealircd/unrealircd-webpanel.git] / api / overview.php
1 <?php
2
3 session_start();
4 if (!isset($_SESSION["id"]))
5 die("{\"error\": \"Access denied\"}");
6
7 include "../common.php";
8
9 // Close the session now, otherwise other pages block too long
10 session_write_close();
11
12 include "../connection.php";
13
14 header("Content-type: application/json");
15
16 $stats = $rpc->query("stats.get", []);
17 echo json_encode($stats);