Telegram-based chat on a PHP-based site: HOWTO?

I can’t understand what exactly to use for the interaction between my website and the Telegram service (first of all, how to get the authentication process using PHP and other things, such as chat among users).

On this page: https://core.telegram.org/api I have no idea how to use these functions in PHP.

According to this page: https://telegram.org/apps I have two options:

1) CLI interface (by the way, unofficial): https://github.com/vysheng/tg, and it does not have an authorization function among others. To authenticate, you need to run:

bin/telegram-cli -k tg-server.pub 

and inside the application you must enter your mobile phone and secret code sent by SMS - after that you are authorized. Then you install https://github.com/zyberspace/php-telegram-cli-client and run telegram-cli as a daemon:

./bin/telegram-cli -dWS /tmp/tg.sck -k tg-server.pub &  

Does this mean that I have to create tg-server.pub manually using PHP for every user trying to log in?

2) Webogram: https://github.com/zhukov/webogram - but it is written in JavaScript and has very complex code.

Dear Stackoverflow gurus, maybe you are more attentive than me and could help me recognize the correct solution (or an example, I don’t know, a PHP fragment or something else) for a user chat based on Telegram and PHP?

I would greatly appreciate it!

Thank!

+5
3

AuthKey (VB.net)

API Telegram - ... - AuthKey, , ... .

GitHub src , , , TelegramAPI

+4

, PHP- Telegram API . , Telegram PHP- Telegram: .

  • - ( ) , .
  • - AJAX , . , ( https), , ( Wi-Fi - ).

API Telegram, , . , -, .

- <iframe> -:)

+1

MadlineProto https://github.com/danog/MadelineProto - PHP- MTProto Telegram!

0

All Articles