2017 © Pedro Peláez
 

project madelineproto

PHP implementation of telegram's MTProto protocol.

image

peppelg/madelineproto

PHP implementation of telegram's MTProto protocol.

  • Monday, April 30, 2018
  • by peppelg
  • Repository
  • 0 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 154 Forks
  • 0 Open issues
  • 18 Versions
  • 0 % Grown

The README.md

MadelineProto, a PHP MTProto telegram client

Created by Daniil Gentili, (*1)

Do join the official channel, @MadelineProto and the support groups!, (*2)

Approved by Telegram!, (*3)

What's this?

This library can be used to easily interact with Telegram without the bot API, just like the official apps., (*4)

It can login with a phone number (MTProto API), or with a bot token (MTProto API, no bot API involved!)., (*5)

It is now fully async!, (*6)

Getting started (now fully async!)

<?php

if (!file_exists('madeline.php')) {
    copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->async(true);
$MadelineProto->loop(function () use ($MadelineProto) {
    yield $MadelineProto->start();

    $me = yield $MadelineProto->get_self();

    $MadelineProto->logger($me);

    if (!$me['bot']) {
        yield $MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => "Hi!\nThanks for creating MadelineProto! <3"]);
        yield $MadelineProto->channels->joinChannel(['channel' => '@MadelineProto']);

        try {
            yield $MadelineProto->messages->importChatInvite(['hash' => 'https://t.me/joinchat/Bgrajz6K-aJKu0IpGsLpBg']);
        } catch (\danog\MadelineProto\RPCErrorException $e) {
            $MadelineProto->logger($e);
        }

        yield $MadelineProto->messages->sendMessage(['peer' => 'https://t.me/joinchat/Bgrajz6K-aJKu0IpGsLpBg', 'message' => 'Testing MadelineProto!']);
    }
    yield $MadelineProto->echo('OK, done!');
});

Try this code now! or run this code in a browser or in a console., (*7)

Tip: if you receive an error (or nothing), send us the error message and the MadelineProto.log file that was created in the same directory (if running from a browser)., (*8)

Documentation

Very complex and complete examples

You can find examples for nearly every MadelineProto function in * tests/testing.php - examples for making/receiving calls, making secret chats, sending secret chat messages, videos, audios, voice recordings, gifs, stickers, photos, sending normal messages, videos, audios, voice recordings, gifs, stickers, photos. * bot.php - examples for sending normal messages, downloading any media * secret_bot.php - secret chat bot * magna.php - examples for receiving calls * userbots/pipesbot.php - examples for creating inline bots and using other inline bots via a userbot * userbots/MadelineProto_bot.php - Multi-function bot * userbots/pwrtelegram_debug_bot - Multi-function bot, (*9)

The Versions

30/04 2018

dev-master

9999999-dev https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPL-3.0-only

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

30/04 2018

3.1

3.1.0.0 https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPL-3.0-only

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

30/04 2018

3.0

3.0.0.0 https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPL-3.0-only

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

04/04 2018

dev-voip

dev-voip https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPL-3.0-only

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

20/03 2018

dev-documentation-rework

dev-documentation-rework https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPL-3.0-only

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

08/03 2018

dev-beta

dev-beta https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPL-3.0-only

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

02/03 2018

dev-logging

dev-logging https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPL-3.0-only

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

21/08 2017

dev-threading

dev-threading https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPL-3.0

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

24/07 2017

2.0

2.0.0.0 https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPL-3.0

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

19/06 2017

1.4

1.4.0.0 https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPL-3.0

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

29/05 2017

1.3.1

1.3.1.0 https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPL-3.0

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

19/05 2017

1.3

1.3.0.0 https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPLv3

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

05/04 2017

1.2

1.2.0.0 https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPLv3

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

05/02 2017

1.0.1

1.0.1.0 https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPLv3

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

05/02 2017

1.0

1.0.0.0 https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPLv3

The Requires

 

The Development Requires

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

01/01 2017

1.0-rc

1.0.0.0-RC https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPLv3

The Requires

 

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

25/11 2016

1.0-beta.1

1.0.0.0-beta1 https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

AGPLv3

The Requires

 

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb

25/11 2016

v1.0-beta

1.0.0.0-beta https://daniil.it/MadelineProto

PHP implementation of telegram's MTProto protocol.

  Sources   Download

MIT

The Requires

 

by Daniil Gentili

php files client audio video telegram protocol messenger bytes mtproto stickers gb