-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
33 lines (23 loc) · 1.59 KB
/
Copy pathindex.php
File metadata and controls
33 lines (23 loc) · 1.59 KB
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
<?php
require_once('lib/sendSMS.php');
use Web2sms\sendSMS;
$sendSMS = new sendSMS();
$sendSMS->accountType = 'prepaid'; // postpaid | prepaid
/**
* Postpaid account
*/
$sendSMS->apiKey = 'YOUR_API_KEY_HERE_._YOU_HAVE_IT_FROM_WEB2SMS_PLATFORM'; // Your api KEY
$sendSMS->secretKey = 'YOUR_SECRET_KEY_HERE_._YOU_HAVE_IT_FROM_WEB2SMS_PLATFORM'; // Your secret KEY
$sendSMS->messages[] = [
'sender' => null, // who send the SMS // Optional
'recipient' => '07XXXXXXXX', // who receive the SMS // Mandatory
'body' => 'This is a simple SMS - '.rand(0,1000), // The actual text of SMS // Mandatory
'scheduleDatetime' => null, // Date & Time to send SMS // Optional
'validityDatetime' => null, // Date & Time of expire SMS // Optional
'callbackUrl' => 'https://yourdomain.ro/web2sms/', // Call back // Optional
'userData' => null, // User data // Optional
'visibleMessage' => false // false -> show the Org Msg & True is not showing the Org Msg // Optional
];
$sendSMS->setRequest();
$result = $sendSMS->sendSMS();
print_r($result);