PHP Classes

File: test/myContacts.php

Recommend this page to a friend!
  Classes of Joseluis Laso   PHP Telegram CLI Wrapper   test/myContacts.php   Download  
File: test/myContacts.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Telegram CLI Wrapper
Send messages and other commands to Telegram users
Author: By
Last change:
Date: 8 years ago
Size: 470 bytes
 

Contents

Class file image Download
<?php

include_once __DIR__ . '/../vendor/autoload.php';

use
TelegramCliWrapper\TelegramCliWrapper;
use
TelegramCliWrapper\TelegramCliHelper;
use
TelegramCliWrapper\Models\User;

$th = TelegramCliHelper::getInstance();
$t = new TelegramCliWrapper($th->getSocket(), $th->isDebug());

echo
"These are my contacts" . PHP_EOL .
   
User::getTitles() . PHP_EOL;

$contacts = $t->getContactList();
foreach (
$contacts as $contact) {
    echo
$contact . PHP_EOL;
}

$t->quit();