Answer the question
In order to leave comments, you need to log in
How to optimize mass mailing in PHP?
Good day,
I'm writing a function for mass mailing messages over the SOAP protocol. There is a function that parses values from JSON and sends them in a foreach loop:
$sms = json_decode($response);
foreach($sms->data as $mydata)
{
$client->sendSmsOne($sessid, $mydata->phone, $mydata->from, $mydata->text);
}
Answer the question
In order to leave comments, you need to log in
Will not hang. do not worry.
In the worst case, it will fall into a max execution time error if it is not a cli.
To optimize something, you need to know what exactly, first determine the problem that you want to optimize.
Use queues that you will store in the database, the same mysql is most likely quite suitable for your tasks.
Better yet, use frameworks where everything has already been thought of for you. Laravel is easy enough to get into and very functional.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question