2018-03-20 12:04:44 +00:00
2018-03-20 12:04:44 +00:00
2018-03-04 17:42:48 +01:00
2018-03-20 12:48:05 +01:00
2018-03-20 12:48:05 +01:00
2018-03-20 12:48:05 +01:00
2018-03-04 17:42:48 +01:00
2017-10-01 18:37:24 +02:00
2017-09-24 22:26:06 +00:00
2018-03-03 18:23:12 +01:00
2018-03-20 12:48:05 +01:00
2018-03-02 00:38:10 +00:00
2017-06-03 16:40:14 +02:00
2018-03-20 12:48:05 +01:00
2017-02-13 13:27:59 +01:00
2018-03-20 12:48:05 +01:00
2017-07-24 13:43:09 +02:00
2016-08-08 18:10:13 +02:00
2018-03-02 00:38:10 +00:00
2018-03-01 13:28:16 +01:00
2018-03-04 17:42:48 +01:00
2018-03-20 12:04:44 +00:00
2018-03-20 12:48:05 +01:00
2018-03-20 12:48:05 +01:00

MadelineProto, a PHP MTProto telegram client

Do join the official channel, @MadelineProto and the support groups!

What's this?

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

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

Getting started

<?php

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

// !!! This API id/API hash combination will not work !!!
// !!! You must get your own @ my.telegram.org !!!
$api_id = 0;
$api_hash = '';

$MadelineProto = new \danog\MadelineProto\API('session.madeline', ['app_info' => ['api_id' => $api_id, 'api_hash' => $api_hash]]);
$MadelineProto->start();    

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

Run this code in a browser or in a console.

Documentation

Very complex and complete examples

You can find examples for nearly every MadelineProto function in

Description
Async PHP client/server API for the telegram MTProto protocol
https://docs.madelineproto.xyz
Readme 52 MiB
Languages
PHP 92.5%
Type Language 6.5%
Shell 0.9%
Dockerfile 0.1%