PHP code example of cron13 / smsintel-api
1. Go to this page and download the library: Download cron13/smsintel-api library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cron13 / smsintel-api example snippets
// You may need to amend this path to locate composer's autoloader
in', 'password');
// send sms
$result = $sender->send('phoneNumber', 'From', 'Your message text');
$result = $sender->send('phoneNumber', 'From', 'Your message text');
$phones = [
'79999999999'
'79999999991'
'79999999992'
];
$result = $sender->send($phones, 'From', 'Your message text');
$result = $sender->cancel($smsId);
$result = $sender->requestSource('FromPHP');
$contact = $sender->getPhoneInfo('79999999999');
$contacts = $sender->getContacts();
$groupId = 1;
$contacts = $sender->getContacts($groupId);
$phone = '79999999999';
$contacts = $sender->getContacts(null, $phone);
// or with group:
$groupId = 1;
$contacts = $sender->getContacts($groupId, $phone);
$contactInfo = [
'idGroup' => 1 // ired
'f' => 'Second Name',
'i' => 'First Name',
'o' => 'Middle Name',
'bday' => 'YYYY-mm-dd',
'sex' => 1 // 1 - male, 2 - female
];
$result = $sender->addContact($contactInfo);
$sender->removeContact('79999999999');
$groupId = 1;
$sender->removeContact('79999999999', $groupId);
$groups = $send->getGroups();
$groups = $sender->getGroups($groupId);
$groups = $sender->getGroups(null, $groupName);
$result = $sender->createGroup('NewGroup');
$result = $sender->editGroup($newName, $groupId);
$result = $sender->getAccountInfo();
$result = $sender->getBalance();
$result = $sender->checkCoupon('couponCode');
$result = $sender->checkCoupon('couponCode', false);
$result = $sender->getReportByNumber($dateFrom, $dateTo, '79999999999');
$result = $sender->getReportByNumber($dateFrom, $dateTo);
$result = $sender->getReportBySms($smsId);
$result = $sender->getReportBySource($dateFrom, $dateTo, 'FromPHP');
$result = $sender->getReportBySource($dateFrom, $dateTo);