PHP code example of mirkhamidov / yii2-telegram-notifications

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

    

mirkhamidov / yii2-telegram-notifications example snippets


'components' => [
    ...,
    'telegram' => [
        'class' => \m1roff\TelegramNotifications::class,
        'token' => ***', // Token of your bot
        'chat' => ***, // Notifications chat id
        'extraTitle' => "⚠️⚠️⚠️ Some extra title added to message⚠️⚠️⚠️\n", // optional
        'proxy' => 'socks5://LOGIN:PASS@PROXY_ADDRESS:PROXY_PORT', // optional, if needed to use proxy, like in Russia
    ],
],