carbone/supervision-server

Allow to monitor web server.

v0.2.8 2018-01-11 11:56 UTC

This package is auto-updated.

Last update: 2024-12-13 04:02:53 UTC


README

#!php

$app->get('/all', function () use ($app) {

  $token = $_GET['key'];
  $server = new \Carbone\SupervisionServer\SupervisionServer('$2y$10$HF2MPTgji9Dvq5OCfqcg1uoFwPisEGsPiZFC9zpBcAu14AdBoYhji'); // password_hash('pass', PASSWORD_DEFAULT);

  echo json_encode($server->handle_all($token));

});

$app->get('/ping', function () use ($app) {

  $token = $_GET['key'];
  $server = new \Carbone\SupervisionServer\SupervisionServer('$2y$10$HF2MPTgji9Dvq5OCfqcg1uoFwPisEGsPiZFC9zpBcAu14AdBoYhji'); // password_hash('pass', PASSWORD_DEFAULT);

  echo json_encode($server->handle_ping($token)); // 

});