The web based syslog https://lggr.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

api.php 675B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. spl_autoload_register(
  3. function ($class) {
  4. include 'inc/' . strtolower($class) . '_class.php';
  5. });
  6. session_start();
  7. if (! isset($_REQUEST['a'])) {
  8. header('Location: index.php');
  9. exit();
  10. } // if
  11. $config = new Config();
  12. $state = new LggrState();
  13. $l = new Lggr($state, $config);
  14. switch ($_REQUEST['a']) {
  15. case 'latest':
  16. $id = intval($_REQUEST['id']);
  17. $aEvents = $l->getNewer($id);
  18. header('Content-Type: application/json; charset=utf8');
  19. echo json_encode($aEvents);
  20. break;
  21. default:
  22. // ignore
  23. break;
  24. } // switch
Social stuff:
Mastodon