carbone/supervision-server

允许监控Web服务器。

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

This package is auto-updated.

Last update: 2024-09-13 03:24:09 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)); // 

});