All Projects → danog → Madelineproto

danog / Madelineproto

Licence: agpl-3.0
Async PHP client/server API for the telegram MTProto protocol

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to Madelineproto

Pyrogram
Telegram MTProto API Client Library and Framework in Pure Python for Users and Bots
Stars: ✭ 2,252 (+26.8%)
Mutual labels:  telegram-api, async, telegram, mtproto
Mypackbot
🤖 Your own unlimited pack of Telegram-stickers
Stars: ✭ 18 (-98.99%)
Mutual labels:  telegram-api, bot, telegram, stickers
Mtproto
Full-native go implementation of Telegram API
Stars: ✭ 566 (-68.13%)
Mutual labels:  telegram-api, hacktoberfest, telegram, mtproto
Groupbutler
This bot can help you in managing your group with rules, anti-flood, description, custom triggers, and much more!
Stars: ✭ 399 (-77.53%)
Mutual labels:  telegram-api, bot, hacktoberfest, telegram
Telethon
Pure Python 3 MTProto API Telegram client library, for bots too!
Stars: ✭ 5,805 (+226.86%)
Mutual labels:  telegram-api, hacktoberfest, telegram, mtproto
Novagram
An Object-Oriented PHP library for Telegram Bots
Stars: ✭ 112 (-93.69%)
Mutual labels:  telegram-api, bot, telegram, mtproto
Telegramd
Unofficial open source telegram server written in golang
Stars: ✭ 609 (-65.71%)
Mutual labels:  telegram-api, telegram, mtproto
Telegram Api
Complete async capable Telegram bot API implementation for PHP7
Stars: ✭ 650 (-63.4%)
Mutual labels:  telegram-api, amphp, telegram
Informer
A Telegram Mass Surveillance Bot in Python
Stars: ✭ 745 (-58.05%)
Mutual labels:  telegram-api, bot, telegram
Java Telegram Bot Api
Telegram Bot API for Java
Stars: ✭ 819 (-53.89%)
Mutual labels:  telegram-api, bot, telegram
Node Procedural Async
Write procedural style code that runs asynchronously. It may look synchronous, but it's not!
Stars: ✭ 17 (-99.04%)
Mutual labels:  async, proxy, easy
Botogram
Just focus on your bots.
Stars: ✭ 106 (-94.03%)
Mutual labels:  bot, hacktoberfest, telegram
Ex gram
Telegram Bot API low level API and framework
Stars: ✭ 103 (-94.2%)
Mutual labels:  bot, hacktoberfest, telegram
Notify
A dead simple Go library for sending notifications to various messaging services.
Stars: ✭ 727 (-59.07%)
Mutual labels:  bot, hacktoberfest, telegram
Telegram Mtproto
Telegram client api (MTProto) library
Stars: ✭ 542 (-69.48%)
Mutual labels:  telegram-api, telegram, mtproto
Callsmusic
The first open-source PyTgCalls-based project.
Stars: ✭ 62 (-96.51%)
Mutual labels:  async, telegram, mtproto
Mtprotoproxy
Async MTProto proxy for Telegram
Stars: ✭ 1,014 (-42.91%)
Mutual labels:  telegram, proxy, mtproto
Turibot
TuriBot is a simple way to communicate with Telegram APIs in PHP
Stars: ✭ 68 (-96.17%)
Mutual labels:  telegram-api, bot, telegram
Tgbot Cpp
C++ library for Telegram bot API
Stars: ✭ 439 (-75.28%)
Mutual labels:  telegram-api, bot, telegram
Werewolf
Werewolf for Telegram
Stars: ✭ 458 (-74.21%)
Mutual labels:  bot, hacktoberfest, telegram

MadelineProto, a PHP MTProto telegram client

phabel.io - PHP transpiler

Created by Daniil Gentili

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

Now with Telegram TON blockchain integration!

Approved by Telegram!

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!).

It is now fully async!

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

$me = $MadelineProto->getSelf();

$MadelineProto->logger($me);

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

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

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

Try this code now! or run this code in a browser or in a console.

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).

Examples

You can find examples for nearly every MadelineProto function in

  • magnaluna webradio - Multifeatured Telegram VoIP webradio
  • downloadRenameBot.php - download files by URL and rename Telegram files using this async parallelized bot!
  • bot.php - examples for sending normal messages, downloading any media
  • secret_bot.php - secret chat bot
  • pipesbot.php - examples for creating inline bots and using other inline bots via a userbot

Documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].