1. Go to this page and download the library: Download nullform/tgstat-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/ */
nullform / tgstat-client example snippets
use Nullform\TGStatClient;
$client = new TGStatClient\Client($token);
$client->sandbox(true);
$client->timeout(10);
$client->userAgent('TGStatClient');
try {
// API request statistics
$usage_stat = $client->callUsageStat();
} catch (\Exception $exception) {
$error = $exception->getMessage();
}