承接 mudassar1/telenor-sms-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mudassar1/telenor-sms-php

Composer 安装命令:

composer require mudassar1/telenor-sms-php

包简介

Telenor Pakistan Corporate SMS API Wrapper for PHP

README 文档

README

Build Status Total Downloads Latest Stable Version License

This composer package offers a quick Telenor Corporate SMS setup for your Laravel applications.

Installation

Begin by pulling in the package through Composer.

composer require mudassar1/telenor-sms-php

Laravel Framework Usage

Within your controllers, you can call Telenor facade and can send quick SMS.

For Single Number
use Developifynet\Telenor\Telenor;
public function index()
{
    $SMSObj = array(
        'username' => '<PUT_YOUR_USERNAME_HERE>',   // Usually this is mobile number
        'password' => '<PUT_YOUR_PASSWORD_HERE>',   // User your password here
        'to' => '923XXXXXXXXX',                     // You can provide single number as string or an array of numbers
        'text' => '<PUT_YOUR_MESSAGE_HERE>',        // Message string you want to send to provided number(s)
        'mask' => '<PUT_YOUR_MASK_HERE>',           // Use a registered mask with Telenor
        'test_mode' => '0',                         // 0 for Production, 1 for Mocking as Test
    );
    
    $response = Telenor::SendSMS($SMSObj);
}
For Multiple Numbers
use Developifynet\Telenor\Telenor;
public function index()
{
    $SMSObj = array(
        'username' => '<PUT_YOUR_USERNAME_HERE>',   // Usually this is mobile number
        'password' => '<PUT_YOUR_PASSWORD_HERE>',   // User your password here
        'to' => ['923XXXXXXXXX', '923XXXXXXXXX'],   // You can provide single number as string or an array of numbers
        'text' => '<PUT_YOUR_MESSAGE_HERE>',        // Message string you want to send to provided number(s)
        'mask' => '<PUT_YOUR_MASK_HERE>',           // Use a registered mask with Telenor
        'test_mode' => '0',                         // 0 for Production, 1 for Mocking as Test
    );
    
    $response = Telenor::SendSMS($SMSObj);
}

Other Usage

Within your controllers, you can call TelenorSMS Object and can send quick SMS.

For Single Number
use \Developifynet\Telenor\TelenorSMS;
public function index()
{
    $SMSObj = array(
        'username' => '<PUT_YOUR_USERNAME_HERE>',   // Usually this is mobile number
        'password' => '<PUT_YOUR_PASSWORD_HERE>',   // User your password here
        'to' => '923XXXXXXXXX',                     // You can provide single number as string or an array of numbers
        'text' => '<PUT_YOUR_MESSAGE_HERE>',        // Message string you want to send to provided number(s)
        'mask' => '<PUT_YOUR_MASK_HERE>',           // Use a registered mask with Telenor
        'test_mode' => '0',                         // 0 for Production, 1 for Mocking as Test
    );
    
    $telenor = new TelenorSMS();
    $response = $telenor->SendSMS($SMSObj);
}
For Multiple Numbers
use \Developifynet\Telenor\TelenorSMS;
public function index()
{
    $SMSObj = array(
        'username' => '<PUT_YOUR_USERNAME_HERE>',   // Usually this is mobile number
        'password' => '<PUT_YOUR_PASSWORD_HERE>',   // User your password here
        'to' => ['923XXXXXXXXX', '923XXXXXXXXX'],   // You can provide single number as string or an array of numbers
        'text' => '<PUT_YOUR_MESSAGE_HERE>',        // Message string you want to send to provided number(s)
        'mask' => '<PUT_YOUR_MASK_HERE>',           // Use a registered mask with Telenor
        'test_mode' => '0',                         // 0 for Production, 1 for Mocking as Test
    );
    
    $telenor = new TelenorSMS();
    $response = $telenor->SendSMS($SMSObj);
}

Note

Provided numbers should start with Country code. A Pakistani number you have to write down as 923XXXXXXXXX

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固