PHP code example of levkopo / dribots

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

    

levkopo / dribots example snippets


use DriBots\Bot;
use DriBots\Data\Message;
use DriBots\DriBotsHandler;
use DriBots\Platforms\TelegramPlatform;
use DriBots\Platforms\VKPlatform;

const TELEGRAM_BOT_TOKEN = "<telegram token>";

const VK_ACCESS_TOKEN = "<vk token>";
const VK_GROUP_ID = <vk group id>;

ddPlatform(new VKPlatform(VK_ACCESS_TOKEN, VK_GROUP_ID))
    ->addPlatform(new TelegramPlatform(TELEGRAM_BOT_TOKEN))
    ->handle();