I
I
Ivan2016-06-11 07:36:03
PHP
Ivan, 2016-06-11 07:36:03

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

5 answer(s)
D
Dmitry Entelis, 2016-06-11
@DmitriyEntelis

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.

P
pavelblog, 2018-01-10
@pavelblog

Here is my simple example of a bot, without unnecessary dependencies, composers and other husks. Download, run, done.
https://github.com/webportnoy/telegram_bot

D
Dmitry Kalinin, 2016-06-11
@kal1sha

Here is a primitive example . Then you can look in the direction of this article .

S
Sergey Goryachev, 2016-06-11
@webirus

https://habrahabr.ru/post/302056/
Look at the bot for the helper site.
Seems like a great example.

L
littleguga, 2016-06-11
@littleguga

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 question

Ask a Question

731 491 924 answers to any question