PHP Classes

File: test/userInfo.php

Recommend this page to a friend!
  Classes of Joseluis Laso   PHP Telegram CLI Wrapper   test/userInfo.php   Download  
File: test/userInfo.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: 547 bytes
 

Contents

Class file image Download
<?php

if (!isset($argv[1])) {
    die(
"You have to call this program with the peer you want to see his info\n");
}

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());

$peer = trim($argv[1]);

echo
"The info for '$peer' is " . PHP_EOL .
   
User::getTitles() . PHP_EOL .
   
$t->getUserInfo($peer) . PHP_EOL;

$t->quit();