L
L
luckyjenro02021-12-10 19:44:17
PHP
luckyjenro0, 2021-12-10 19:44:17

How to disable access to a bot other than Telegram?

Hello! I am writing a bot in PHP for TELEGRAM. Let's say it's located on my path: https://domain.ru/bot.php .

QUESTION: How can I forbid everyone except the bot from entering here? so that attackers could not send their data here, and so on.

As I understand it, it is necessary to filter IP addresses and close them from everyone except TELEGRAM. But what is his IP address? Or how can it be played?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nozzy, 2021-12-11
@nozzy

Generate a long random string and paste it into the filename or url. Then write hook.
https://domain.ru/long_random_string.php
https://domain.ru/long_random_string/bot.php .

L
Lici, 2015-06-21
@Lici

There, where the least study will distract from their affairs. You can develop yourself much faster than a university does. And in our Soviet space, the crust is still not superfluous.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question