PHP code example of alexeevdv / telegram-cli-client

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

    

alexeevdv / telegram-cli-client example snippets



$telegram = new \Zyberspace\Telegram\Cli\Client('unix:///tmp/tg.sck');

$contactList = $telegram->getContactList();
$telegram->msg($contactList[0]->print_name, 'Hey man, what\'s up? :D');