meysam-znd / hostiran-sms-provider
HostIran SMS 提供商
1.0.5
2020-07-22 09:00 UTC
Requires
- php: >=7.2
- ext-soap: *
- guzzlehttp/guzzle: >=5.5
- illuminate/support: ^6.0|^7.0
- laravel/framework: >=7.2
Requires (Dev)
- orchestra/testbench: ^4.0|^5.0
- phpunit/phpunit: ^8.4|^9.0
README
包描述:为 Laravel 提供的 HostIran SMS 发送器包
安装
通过 composer 安装
composer require meysam-znd/hostiran-sms-provider
发布包资源
php artisan vendor:publish --provider="MeysamZnd\HostiranSmsProvider\ServiceProvider"
使用方法
向一个或几个号码发送短信
对于向多个号码发送短信,请用 ", " 作为字符串分隔这些号码。
use MeysamZnd\HostiranSmsProvider\HostiranSmsProvider; use MeysamZnd\HostiranSmsProvider\ToOne; $url = 'https://rest.payamak-panel.com/api/SendSMS/SendSMS'; $data = [ 'username' => 'your username', 'password' => 'your password', 'from' => 'sender number', 'to' => 'receiver numbers', 'text' => 'your text message', 'isflash' => false, ]; $sender = new HostiranSmsProvider(new ToOne()) ; // send and get the result dd ( $sender->send($url, $data) );
按计划向一个或多个号码发送短信
对于向多个号码发送短信,请用 ", " 作为字符串分隔这些号码。
use MeysamZnd\HostiranSmsProvider\HostiranSmsProvider; use MeysamZnd\HostiranSmsProvider\ToMany; use MeysamZnd\HostiranSmsProvider\ToOne; $url = 'http://api.payamak-panel.com/post/schedule.asmx?wsdl'; $data = [ 'username' => 'your username', 'password' => 'your password', 'from' => 'sender number', 'to' => 'receiver numbers', 'text' => 'your text message', 'isflash' => false, 'scheduleDateTime' => 'your time', 'period' => 'Once', ]; $sender = new HostiranSmsProvider(new ToMany()) ; // send and get the result dd ( $sender->send($url, $data) );
安全
如果您发现任何与安全相关的问题,请通过电子邮件联系,而不是使用问题跟踪器。