meysam-znd / hostiran-sms-provider
A hostiran sms provider
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
Package description: HostIran SMS sender package for laravel
Installation
Install via composer
composer require meysam-znd/hostiran-sms-provider
Publish package assets
php artisan vendor:publish --provider="MeysamZnd\HostiranSmsProvider\ServiceProvider"
Usage
Send sms to one number or few numbers
for sending sms to few numbers, separate those numbers with ", " as a string.
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) );
Send sms to one, or many numbers with schedule
for sending sms to few numbers, separate those numbers with ", " as a string.
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) );
Security
If you discover any security related issues, please email instead of using the issue tracker.