A
A
AlexTGMadmin2018-05-29 00:02:42
PHP
AlexTGMadmin, 2018-05-29 00:02:42

Bot on php does not start, what should I do?

Followed these instructions:
Installation
=========
1. First, create a bot account and get its token via @BotFather.
Then open the config.php file in a text editor (for example, notepad)
and write the username and token of the bot as the values ​​of the corresponding constants:
define('BOT_USERNAME', 'unsername_bot');
define('BOT_TOKEN', 'bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11');
2. You will need at least virtual hosting.
Domain or subdomain, not important.
The main thing is that the hosting provider supports SSL.
For example, sweb.ru.
It is not necessary to buy an SSL certificate,
you can generate your own at sslforfree.com.
The main thing is that the hosting provider allows you to connect it.
See the "SSL" section or something like that in your hosting control panel.
3. Upload the contents of the archive for hosting and access the
install.php file through the browser, it will give you a webhook installation report for your bot.
4. Create a supergroup, you can private.
Add a bot to it, give it admin rights.
At the moment, on any command, it will return a unique
chat ID. Copy it and write it as the value of the
corresponding constant in the config.php file:
define('CHAT_ID', -12345);
Don't forget to remove the pound sign (#) at the beginning of this line!
========================================
I did everything right, but for some reason the bot does not start, this is what comes out in the browser after I run " https://tgm-bot.000webhostapp.com/install.php ":
set webhook...
Result:
object( stdClass)#1 (3) {
["ok"]=>
bool(false)
["error_code"]=>
int(404)
["description"]=>
string(9) "Not Found"
}
get webhook info. ..
Result:
object(stdClass)#2 (3) {
["ok"]=>
bool(false)
["error_code"]=>
int(404)
["description"]=>
string(9) "Not Found "
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yan-s, 2018-05-29
@Yan-s

Contact the bot manufacturer. And what about a toaster?
The bot writes that it made a request and received a 404 page not found response.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question