PHP code example of api-clients / supervisord
1. Go to this page and download the library: Download api-clients/supervisord library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
api-clients / supervisord example snippets
use ApiClients\Client\Supervisord\AsyncClient;
use ApiClients\Client\Supervisord\Resource\StateInterface;
use React\EventLoop\Factory;
use function ApiClients\Foundation\resource_pretty_print;
$loop = Factory::create();
$client = AsyncClient::create('127.0.0.1:9005', $loop); // My supvervisor runs at 127.0.0.1:9005 changes for your HTTP IP + port
$client->state()->done(function (StateInterface $state) {
resource_pretty_print($state);
});
$loop->run();