-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsend.php
More file actions
32 lines (24 loc) · 830 Bytes
/
send.php
File metadata and controls
32 lines (24 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
require '.config/config.php';
if(isset($_POST['submit'])){
$deviceID = $_POST['from'];
$numbers = str_replace(' ', '', $_POST['dest']);
$message = $_POST['message'];
if (strpos($numbers, ',') !== false) {
$numbers=explode(",",$numbers);
}
$result = $smsGateway->sendMessageToManyNumbers($numbers, $message, $deviceID);
$json_msg = json_encode($result);
echo '<pre>' . $json_msg . '</pre>';
// echo count($numbers);
// echo count($_POST['dest']);
}
// $deviceID = 16328;
// $numbers = '+16477831190';
// $message = 'OYEEEEEE!';
// $options = [
// '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($numbers, $message, $deviceID, $options);
?>