PHP code example of idct / php-telegram-sender

1. Go to this page and download the library: Download idct/php-telegram-sender 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/ */

    

idct / php-telegram-sender example snippets


use IDCT\TelegramSender\TelegramSender;

TelegramSender::checkIfBotIsValid(123123123);

TelegramSender::retrieveBotInfo(123123123);

TelegramSender::sendMessage(Bot $bot, Channel $channel, string $message, ParseMode $parseMode = null, bool $disableWebPagePreview = false, bool $disableAudioNotification = false, int $threadId = null);

TelegramSender::sendMessage(
    new Bot(123123123, 'AAFKeyoJC6wHmHW85TfUktEMc2x5iz9melE'),
    new PrivateChannel(90808012),
    'my message'
);

$bot = new Bot(635092640, 'AAGfG72lFg0L_Uf8Cfhb5wBi4UFTm7R2lDY');
bash
composer