meysam-znd/hostiran-sms-provider

A hostiran sms provider

1.0.5 2020-07-22 09:00 UTC

This package is auto-updated.

Last update: 2024-05-18 10:57:59 UTC


README

GitHub Workflow Status styleci Code Intelligence Status Scrutinizer Code Quality Build Status

Packagist Packagist Packagist Packagist

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.

Credits