Answer the question
In order to leave comments, you need to log in
How to host two PHP telegram bots on the same hosting?
Good afternoon. There is a telegram bot that works via Webhook.
When I run it from the root directory of the site, it works, but when I create an additional folder on the hosting and access to the index.php file starts to have the path: primer.ru/folder/index.php, the bot stops working. Moreover, if I place the main file in primer.ru/index.php, the bot functions again.
Is it possible to somehow host two bots on the same site and hosting?
Answer the question
In order to leave comments, you need to log in
Well, either correctly indicate to the bot where it is located and should work (I don’t know if this is possible)
Or use a VPS, raise your web server there and set up at least 20 bots
It is possible and is done in an elementary way. It can be placed in different directories, it can be placed on different sites (a subdomain is considered a separate site).
If your bot doesn't work when placed in a directory, it's badly written. Should be able to detect its directory automatically.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question