PHP code example of zyberspace / telegram-cli-client

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

    

zyberspace / 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');