PHP code example of rutgerkirkels / ethos-api-client
1. Go to this page and download the library: Download rutgerkirkels/ethos-api-client 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/ */
rutgerkirkels / ethos-api-client example snippets
$client = new \RutgerKirkels\Ethos_Api_Client\Client(<id_of_your_ethos_panel>);
$miners = $client->getAllMiners();
foreach ($miners as $miner) {
echo 'Hashrate for miner ' . $miner->getId() . ': ' . $miner->getHashrate() . ' MH/s<br/>';
}