MadelineProto
Async PHP client/server API for the telegram MTProto protocol
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!). Internal peer management: you can provide a simple bot API chat id or a username to send a message or to call other mtproto methods! You can easily login as a user (2FA is supported) or as a bot! Simple error handling! It is highly customizable with a lot of different settings! Bot API file id/object support (even for users)! A Lua binding, a lua wrapper for td-cli scripts, Secret chats, MTProto 2.0, PFS, PFS in secret chats. MadelineProto can do everything official clients can do, and more! MadelineProto requires the mbstring, xml, json, fileinfo, gmp extensions to function properly.