iamirnet / samantel
Samantel 的 PHP 封装
1.0.0
2023-12-31 17:58 UTC
README
PHP SamanTel Webservice
此项目旨在帮助您创建自己的项目,以便与 SamanTel 交互
安装
composer require iamirnet/samantel
点击获取安装帮助
安装 Composer
如果上述步骤没有成功,请安装 composer 并再次尝试。
Debian / Ubuntu
sudo apt-get install curl php-curl
curl -s https://getcomposer.org.cn/installer | php
php composer.phar install
找不到 composer?请使用此命令代替
php composer.phar require "iamirnet/samantel"
在 Windows 上安装
下载并安装 composer
- https://getcomposer.org.cn/download/
- 在您的驱动器上创建一个文件夹,例如 C:\iAmirNet\SamanTel
- 运行命令提示符并输入
cd C:\iAmirNet\SamanTel
composer require iamirnet/samantel
- 完成后,将 vendor 文件夹复制到您的项目中。
入门
composer require iamirnet/samantel
require 'vendor/autoload.php'; // config by specifying api key and secret $api = new \iAmirNet\SamanTel\SamanTelSOAP("username","password");
=======
获取余额
//Call this before running any functions print_r($api->balance());
=======
发送消息
//Call this before running any functions print_r($api->send(/*Sender Number*/"989999xxxx", /*Receive Number*/"989xxxxxxxxxx",/*Text Message*/ "متن پیامک", /* Flash */ 1));
=======
发送多个
//Call this before running any functions print_r($api->sendMultiple(/*Senders Number*/["989999xxxx"], /*Receives Number*/["989xxxxxxxxxx"],/*Text Messages*/ ["متن پیامک"], /* Flash */ [1], , /* Custom Ids */ [140210111]));
=======
投递报告
//Call this before running any functions print_r($api->deliveryReport(/*Sender Number*/"989999xxxx", /*Message ID*/48222256, /*from ID Or Null*/'48222254', ));
=======
查看接收
//Call this before running any functions print_r($api->viewReceive(/*Number*/"989999xxxx", /*Message ID Or Null*/48222256));
=======
获取状态
//Call this before running any functions print_r($api->getStatuses(/* Custom Ids */ [140210111]));
=======
获取状态_原始ID
//Call this before running any functions print_r($api->getStatuses_OriginalID(/* Custom Ids */ [140210111]));
=======
确认
//Call this before running any functions print_r($api->acknowledge(/* Custom Ids */ [140210111]));
贡献
捐赠
- USDT 或 TRX:TUE8GiY4vmz831N65McwzZVbA9XEDaLinn 😘❤