PHP code example of arus / monolog-telegram-handler
1. Go to this page and download the library: Download arus/monolog-telegram-handler 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/ */
arus / monolog-telegram-handler example snippets
use Arus\Monolog\Handler\TelegramHandler;
use Monolog\Logger;
$token = '000000000:000000000ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$recipient = '000000000';
$sender = new TelegramHandler($token, $recipient);
$logger = new Logger('app');
$logger->pushHandler($sender);
$logger->debug('Hello, world!');