PHPackages                             chipslays/telegram-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. chipslays/telegram-client

ActiveLibrary[API Development](/categories/api)

chipslays/telegram-client
=========================

PHP wrapper over MadelineProto for easy work with Telegram Client API.

0.0.5(4y ago)5531AGPL-3.0-onlyPHP

Since Aug 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/chipslays/telegram-client)[ Packagist](https://packagist.org/packages/chipslays/telegram-client)[ RSS](/packages/chipslays-telegram-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

WIP: PHP Telegram Client
========================

[](#wip-php-telegram-client)

Simple &amp; scalable PHP wrapper over MadelineProto for easy work with Telegram Client API.

> 👷 Work in progress...

Installation
============

[](#installation)

```
composer require chipslays/telegram-client
```

Usage
=====

[](#usage)

Run this script in terminal like `php client.php`.

The first time authorization will take a long time, but the next times it will be faster.

> Event system based on [`chipslays/event`](https://github.com/chipslays/event), see this for more cases.

```
// client.php

use Chipslays\Telegram\Client;

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

$client = new Client([
    'session' => 'user.chipslays',
    'path' => [
        'sessions' => __DIR__ . '/storage/sessions',
    ],
    'madeline' => [
        'settings' => [
            'app_info' => [
                'app_id' => '###',
                'app_hash' => '######',
            ],
            'logger' => [
                'logger_level' => 0,
            ],
        ],
        'parse_mode' => 'html',
    ],
]);

$result = $client->sendMessage('@chipslays', 'Thank you for PHP MadelineProto wrapper!
