PHP code example of furqansiddiqui / telegram

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

    

furqansiddiqui / telegram example snippets




$telegram   = new \Telegram\Telegram("YOUR-API-KEY");


/** @var $telegram \Telegram\Telegram */
$telegram->webHooks()->setWebHook("https://www.domain.tld/telegram");


/** @var $telegram \Telegram\Telegram */
$telegram->setHandler(new MyCustomHandler($telegram));
$telegram->listen($_REQUEST);


/** @var $telegram \Telegram\Telegram */
$telegram->sendMessage($chatId, "Your-Message");