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

纵饮孤独 提交于 2019-12-05 09:19:01
Charles Okwuagwu

I have posted a step by step guide on getting your AuthKey (VB.net) here

The main challenge with Telegram API is the documentation... but if you can work through the first part - getting an AuthKey then i believe the rest should fall in place ... with some more effort.

Working through some GitHub src might be time consuming, it might be best to get a handle on the documentation and then work your way to building your own code for TelegramAPI from scratch

Most likely, PHP wrapper for Telegram API doesn't exist. I'd wager it's because communicating with Telegram servers from your server-side PHP code defeats both of the core features of Telegram: speed and security.

  • no speed - a message has to hop through one additional loop (your server) before it reaches the recipient.
  • no security - browser page will communicate with your server via AJAX or forms, I assume. This means sending data as plain text (unless you're on https), open to the whole world to see (if you were to sit on a public wifi, or something like that).

You can implement the Telegram API, it's a bit involved, but doable. But it's totally pointless, in my opinion.

As an alternative, just embed the webogram in an <iframe> or something :)

Now, you can use MadelineProto https://github.com/danog/MadelineProto - enought powerful PHP client for MTProto Telegram!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!