0
I have a SMS gateway that receives data from my form in this pattern:
<?php
include "smsGateway.php";
$smsGateway = new SmsGateway('[email protected]', 'password');
$deviceID = 1;
$numbers = ['+44771232343', '+44771232344'];
$message = 'Hello World!';
$options = [
'send_at' => strtotime('+10 minutes'), // Send the message in 10 minutes
'expires_at' => strtotime('+1 hour') // Cancel the message in 1 hour if the message is not yet sent
];
//Please note options is no required and can be left out
$result = $smsGateway->sendMessageToManyNumbers($number, $message, $deviceID, $options);
?>
I send the numbers, by means of a 'SELECT' from my database, print in an input field and send the form. However, the operator does not allow to send more than 15 simultaneous messages. It would be possible to send one by one, but giving only a SEND in the form?
A loop loop wouldn’t solve the problem?
– Marcelo de Andrade
The first thing that came to mind was what @Marcelodeandrade said, a loop, for, foreach, while, the $Numbers vc array already has.
– Marcelo Diniz
Try using the method
sleep()
. It causes the PHP script to be delayed by the set time and then run... Another thing you can do is use a<meta refresh>
– Ivan Ferrer