Answer the question
In order to leave comments, you need to log in
How to correctly send a request for file_get_contents in a loop?
Hello!
Dear colleagues, please answer this question.
How would you organize a mailing list in a telegram bot?
If there are 100 subscribers and send messages to each I do
$user = new \TGbot\Users();
foreach($users as $user){
$tgClient->send($user->id,$message);
}
In the send function, the usual file_get_contents()
At the same time, the cycle is not ending, the script is simply chopped off.
How to optimize the script so that the mailing is completely successful and not interrupted
Thanks for the answers.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question