GNU Affero General Public License v3.0

项目介绍

danog/MadelineProto 是一个托管在 GitHub 上的开源项目,主要使用 PHP 编写,采用 GNU Affero General Public License v3.0 许可证,目前获得 3.6k 个 Star、933 次 Fork。

仓库全名
danog/MadelineProto
开源许可证
GNU Affero General Public License v3.0
Star 数
3.6k
Fork 数
933
未关闭 Issue
19

README 摘要

MadelineProto, a PHP MTProto telegram client Created by Daniil Gentili #StandWithUkraine 🇺🇦 Do join the official channel, @MadelineProto and the support groups! 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…

完整内容见 GitHub 原始 README 或本页 。

常见问题

MadelineProto 用什么语言开发?

主要使用 PHP 编写,采用 GNU Affero General Public License v3.0 许可证,目前有 3.6k 个 Star。

MadelineProto 可以免费商用吗?

仓库标注的许可证为 GNU Affero General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 MadelineProto 的源码?

可以直接克隆仓库:git clone https://github.com/danog/MadelineProto.git,默认分支为 v8;安装与运行步骤见仓库 README。

MadelineProto 最近还在维护吗?

仓库最近一次更新为 1 天前,当前有 19 个未关闭 Issue;Star 数为 3.6k,可作为社区活跃度的参考。

README

MadelineProto, a PHP MTProto telegram client

Created by Daniil Gentili

#StandWithUkraine 🇺🇦

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

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

// PHP 8.2+ is required.

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: '@stickeroptimizerbot', message: "/start");

    $MadelineProto->channels->joinChannel(channel: '@MadelineProto');

    try {
        $MadelineProto->messages->importChatInvite(hash: 'https://t.me/+Por5orOjwgccnt2w');
    } catch (\danog\MadelineProto\RPCErrorException $e) {
        $MadelineProto->logger($e);
    }

    // Video call @magicalcrazypony, the MadelineProto video webradio, playing a WebM video (works on webhosts, NO ffmpeg needed!)
    // See https://docs.madelineproto.xyz/docs/CALLS.html for group calls, livestreams, recording and more.
    $MadelineProto->requestCall('@magicalcrazypony', video: true)->play(new \danog\MadelineProto\RemoteUrl('https://paste.daniil.it/oncall.webm'));
}
$MadelineProto->echo('OK, done!');

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

Made with MadelineProto

The following open source projects were created using MadelineProto: you can directly install them, or explore the source code as direct examples on how to use MadelineProto’s many features!

Want to add your own open-source project to this list? Click here!

Some of MadelineProto’s core components are also available as separate, standalone libraries:

Documentation

README 内容过长,已截取前 64 KB。完整内容请前往 GitHub 仓库查看。

评论

暂无评论