Answer the question
In order to leave comments, you need to log in
Are there any great examples of creating a telegram bot in php?
I want to try to make a bot in php. The level of php is weak, but I want to sort it out. I found a lot on the Internet in python, not so much with php. Do you have links and examples?
Answer the question
In order to leave comments, you need to log in
Absolutely everything you need to write a Telegram bot is on the page https://core.telegram.org/bots/api
The bot has an absolutely trivial protocol, json in a certain format is sent by a POST request over HTTPS.
Accordingly, the implementation does not actually depend on the language, you can even do it on bash scripts.
Here is my simple example of a bot, without unnecessary dependencies, composers and other husks. Download, run, done.
https://github.com/webportnoy/telegram_bot
Here is a primitive example . Then you can look in the direction of this article .
https://habrahabr.ru/post/302056/
Look at the bot for the helper site.
Seems like a great example.
It’s still far from a really great example (a lot of functionality has not been implemented, but it performs the main function):
a bot for auto-posting from a VK group/public to a Telegram channel, supports several publics/channels.
github vk-to-telegram-bot
Built on this one: https://github.com/akalongman/php-telegram-bot
This already looks like a great bot example.
As for SSL: I immediately advise you to buy a VPS and install Let's Encrypt there, there will be no problems, or make a self-signed one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question