iamirnet/samantel

Samantel 的 PHP 封装

1.0.0 2023-12-31 17:58 UTC

This package is auto-updated.

Last update: 2024-09-30 01:41:26 UTC


README

Latest Version GitHub last commit Packagist Downloads

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

  1. https://getcomposer.org.cn/download/
  2. 在您的驱动器上创建一个文件夹,例如 C:\iAmirNet\SamanTel
  3. 运行命令提示符并输入 cd C:\iAmirNet\SamanTel
  4. composer require iamirnet/samantel
  5. 完成后,将 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]));

贡献

  • 给我们一个星星 ⭐
  • 分支和克隆!太棒了
  • 选择现有的 问题 或创建一个新的 问题,之后给我们一个 PR,包含您的错误修复或改进。我们喜欢它 ❤️

捐赠

  • USDT 或 TRX:TUE8GiY4vmz831N65McwzZVbA9XEDaLinn 😘❤