定制 abdullahobaid/mobilywslaraval 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

abdullahobaid/mobilywslaraval

Composer 安装命令:

composer require abdullahobaid/mobilywslaraval

包简介

A package to send SMS using Mobily.ws API

README 文档

README

A Laraval Package to send SMS using mobily.ws by using it's API and cURL. It uses UTF-8 endconding for the SMS.

Table of Contents

Features

  • Supports Laravel 5.*
  • Supports sending messages directly
  • Supports sending messages at a certain date/time
  • Supports sending messages to multiple numbers at once
  • new Supports any number format see Usage
  • Requires an active http://mobily.ws account
  • cURL
  • php >=5.3.0

Installation

Install with composer by running composer require abdullahobaid/mobilywslaraval:dev-master
Composer will download and install the package. After the package is downloaded, open config/app.php and add the service provider and alias as below:

'providers' => array(
    ...
    abdullahobaid\mobilywslaraval\MobilywsProvider::class,
),
.
.
.
'aliases' => array(
    ...
    'Mobily'    => abdullahobaid\mobilywslaraval\Mobily::class,
),

Publish the configuration file by running the following Artisan command.

$ php artisan vendor:publish --provider="abdullahobaid\mobilywslaraval\MobilywsProvider"

Finally, you need to edit the configuration file at config/mobilysms.php with your own mobily.ws account info

return [
    'sender'     => '', // Mobily.ws Sender Name
    'mobile'     => '', // Mobily.ws Account Mobile (Username)
    'password'   => '', // Mobily.ws Password
    'deleteKey'  => 541235, 
    'resultType' => 1,
    'viewResult' => 1, 
    'MsgID'      => rand(00000,99999), 
];

Usage

Use any number format

Mobily.ws requires the number to be formated as international number without trailing zeros, but this Package can handle differnt number formats.

You can pass a single number or array of numbers, see examples below:

  • The number can be sent with trailing zeros 00966555555555
  • With trailing plus sign +966555555555
  • International number without trailing zeros 966555555555
  • Even you can use the mobile number without international code - for Saudi Mobile Numbers Only - 0555555555 , the package will take care of formatting the number.

Send SMS message directly

Will send the message directly to the number

Mobily::send(966555555555, 'Your Message Here');

Returns true if the message is sent, false if not.

Send SMS to Multiple Numbers

Pass an array of numbers instead of a single number to send to all of them

$numbers = array('966555555555','966545555555','966565555555');
Mobily::send($numbers, 'Your Message Here');

Returns true if the message is sent, false if not.

Send SMS message at a certain date/time

Will send the message in a desired date and time

Mobily::send(966555555555, 'Your Message Here', $date, $time);
note
  • Date format mm/dd/yyyy
  • Time format hh:mm:ss
  • Returns true if the message is sent, false if not.

Check the current Balance

Mobily::Balance();

Returns user's balance.

Get number of SMS messages a text requires

Mobily::count_messages($text);

Override default sender name

Mobily::send(966555555555, 'Your Message Here', $date=0, $time=0,'Sender Name');

Note that the new sender should be registered and activate at mobily.ws website

License

Waqf General Public Licens

Essentials

abdullahobaid/mobilywslaraval 适用场景与选型建议

abdullahobaid/mobilywslaraval 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.02k 次下载、GitHub Stars 达 11, 最近一次更新时间为 2016 年 10 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「mobily.ws」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 abdullahobaid/mobilywslaraval 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 abdullahobaid/mobilywslaraval 我们能提供哪些服务?
定制开发 / 二次开发

基于 abdullahobaid/mobilywslaraval 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 6.02k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 26
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: waqf
  • 更新时间: 2016-10-10