contactamx/sms
最新稳定版本:v1.0.0
Composer 安装命令:
composer require contactamx/sms
包简介
Send transactional sms
README 文档
README
Documentation at https://www.contacta.mx
Get started fast and easy!
Issues • Need transactional SMS • Info, Cost and More •
Installation
> composer require contactamx/sms
Getting started
<?php require('vendor/autoload.php'); use Contactamx\Sms\Bulker; $bulker = new Bulker(); $bulker->setToken(YOUR_TOKEN_PROVIDED_BY_CONTACTA); // For send sms transactional $result = $bulker->sendMessage(YOUR_PHONE,YOUR_MESSAGE); if ($result->success) { echo "The id of the message is " . $result->id .PHP_EOL; echo "The message sent on " . $result->added_on .PHP_EOL; echo "Additional data " . print_r($result->country, true) .PHP_EOL; $get_log = $bulker->check($result->id); print_r($get_log); } else{ echo "Houston, we have a troubles: " .PHP_EOL. print_r($result, true) ; } // For send flash transactional $result = $bulker->sendFlash(YOUR_PHONE,YOUR_MESSAGE); if ($result->success) { echo "The id of the message is " . $result->id .PHP_EOL; echo "The message sent on " . $result->added_on .PHP_EOL; echo "Additional data " . print_r($result->country, true) .PHP_EOL; $get_log = $bulker->check($result->id); print_r($get_log); } else{ echo "Houston, we have a troubles: " .PHP_EOL. print_r($result, true) ; } // For send otp message $result = $bulker->sendOtp(YOUR_PHONE,YOUR_MESSAGE); if ($result->success) { echo "The id of the message is " . $result->id .PHP_EOL; echo "The message sent on " . $result->added_on .PHP_EOL; echo "Additional data " . print_r($result->country, true) .PHP_EOL; $get_log = $bulker->check($result->id); print_r($get_log); $verify_otp = $bulker->verifyOtp(YOUR_PHONE,YOUR_OTP_CODE); print_r($result); } else{ echo "Houston, we have a troubles: " .PHP_EOL. print_r($result, true) ; } ?>
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2022-07-26