ekreative / smpp-client

SMPP客户端

2.0.1 2019-11-29 15:07 UTC

This package is auto-updated.

Last update: 2024-08-29 04:43:07 UTC


README

基于PHP 5的SMPP客户端包,用于Symfony2。由https://github.com/onlinecity/php-smpp分支而来

目前,它仅发送消息.. 发射模式

安装

添加到composer.json

"require": {
    "kronas/smpp-client-bundle": "1.0.0-dev"
}

添加到AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Kronas\SmppClientBundle\KronasSmppClientBundle(),
    );

    return $bundles;
}

添加到config.yml

kronas_smpp_client:
    host: %smpp_host%
    port: %smpp_port%
    login: %smpp_login%
    password: %smpp_password%
    signature: %smpp_signature%

更多配置参数

用法

$smpp = $this->get('kronas_smpp_client.transmitter');

$smpp->send($phone_number, $message);

*电话号码必须以国际格式输入,不带"+"

**"send"函数返回消息ID

许可证

此包位于MIT许可证之下。请参阅包中的完整许可证。

Resources/meta/LICENSE