cron13/smsintel-api
Composer 安装命令:
composer require cron13/smsintel-api
包简介
A PHP wrapper for the SmsIntel api. Provides one interface for both XML and JSON API requests.
README 文档
README
Library provides common interface for making requests to both XML and JSON smsintel API.
Dependencies
Library requires CURL extension and PHP 5.5.9 or above.
Installation
Via Composer:
composer require seregazhuk/smsintel-api
Quick Start
// You may need to amend this path to locate composer's autoloader require('vendor/autoload.php'); use seregazhuk\SmsIntel\SmsIntel; $sender = SmsIntel::create('login', 'password'); // send sms $result = $sender->send('phoneNumber', 'From', 'Your message text');
Sending messages
To send message to one phone number:
$result = $sender->send('phoneNumber', 'From', 'Your message text');
You can pass an array of phones:
$phones = [ '79999999999' '79999999991' '79999999992' ]; $result = $sender->send($phones, 'From', 'Your message text');
Cancel sms by id:
$result = $sender->cancel($smsId);
Request a source name:
$result = $sender->requestSource('FromPHP');
Groups and contacts
Get contact info by phone number:
$contact = $sender->getPhoneInfo('79999999999');
Get all contacts:
$contacts = $sender->getContacts();
Contacts for specific group:
$groupId = 1; $contacts = $sender->getContacts($groupId);
Contacts by phone number:
$phone = '79999999999'; $contacts = $sender->getContacts(null, $phone); // or with group: $groupId = 1; $contacts = $sender->getContacts($groupId, $phone);
Create a new contact:
$contactInfo = [ 'idGroup' => 1 // required 'phone' => '79999999999' // required 'f' => 'Second Name', 'i' => 'First Name', 'o' => 'Middle Name', 'bday' => 'YYYY-mm-dd', 'sex' => 1 // 1 - male, 2 - female ]; $result = $sender->addContact($contactInfo);
Remove contact by phone number:
$sender->removeContact('79999999999');
You can pass optionally group id:
$groupId = 1; $sender->removeContact('79999999999', $groupId);
Get all groups:
$groups = $send->getGroups();
Get group by id or name:
$groups = $sender->getGroups($groupId); $groups = $sender->getGroups(null, $groupName);
Create a new group of contacts:
$result = $sender->createGroup('NewGroup');
Edit group name by id:
$result = $sender->editGroup($newName, $groupId);
Account
Get account info:
$result = $sender->getAccountInfo();
Get balance:
$result = $sender->getBalance();
Use discount coupon:
$result = $sender->checkCoupon('couponCode');
Only check discount coupon:
$result = $sender->checkCoupon('couponCode', false);
Reports
Get report for period by phone number:
$result = $sender->getReportByNumber($dateFrom, $dateTo, '79999999999');
Get report for period and for all numbers:
$result = $sender->getReportByNumber($dateFrom, $dateTo);
Get report by smsId:
$result = $sender->getReportBySms($smsId);
Get report for period by source:
$result = $sender->getReportBySource($dateFrom, $dateTo, 'FromPHP');
Get report for period for all sources:
$result = $sender->getReportBySource($dateFrom, $dateTo);
How can I thank you?
Why not star the github repo? I'd love the attention!
Thanks!
cron13/smsintel-api 适用场景与选型建议
cron13/smsintel-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 06 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「lib」 「smsintel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cron13/smsintel-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cron13/smsintel-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cron13/smsintel-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A flexible FTP, SSL-FTP, and SSH-based SFTP client for PHP. This lib provides helpers that are easy to use to manage the remote files.
A PHP wrapper for the SmsIntel api. Provides one interface for both XML and JSON API requests.
Client Legacy lib for Rest PKI
Biblioteca para geração de NFSE de Belo Horizonte
Alfabank REST API integration
VoiceText Web API(https://cloud.voicetext.jp/webapi) wrapper library.
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-06-05
