Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
814 stars 343 forks source link

how to send mesaage to very user member(10k) #138

Closed jafarpishdadi closed 4 years ago

jafarpishdadi commented 6 years ago

hello thanks i write bot with this api error display when send message to multi user (after 1000 user) Maximum execution time of 30 seconds exceeded in --------------/Telegram.php on line 1568 send message break or Sometimes they send two messages Increase Maximum execution in code but this error it happens

help me ..

Eleirbag89 commented 6 years ago

The timeout is done by Telegram. You need to add some timeout between send message to avoid been blocked

JavadHollywood commented 4 years ago

hi I have the same problem. What do you mean by (You need to add some timeout between send message to avoid been blocked)?

Eleirbag89 commented 4 years ago

The problem could be Telegram or your hosting. If it's Telegram you can just put a sleep/wait after X messages. If it's your host you should change the script max execution time in php.ini file