PHPackages                             seasonsolution/phpsmpp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. seasonsolution/phpsmpp

ActiveLibrary

seasonsolution/phpsmpp
======================

PHPSMPP is a full-featured SMS creation, transfer and receive class for PHP

v1.0(7y ago)088LGPL-2.1-onlyPHPPHP &gt;=5.3.3

Since Feb 23Pushed 7y agoCompare

[ Source](https://github.com/seasonsolution/phpsmpp)[ Packagist](https://packagist.org/packages/seasonsolution/phpsmpp)[ RSS](/packages/seasonsolution-phpsmpp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PHP-based SMPP client library
=============================

[](#php-based-smpp-client-library)

This library was developed based on [Onlinecity](https://github.com/onlinecity/php-smpp) and improved for use in MVC standard projects.

This is a simplified SMPP client lib for sending or receiving smses through [SMPP v3.4](http://www.smsforum.net/SMPP_v3_4_Issue1_2.zip).

In addition to the client, this lib also contains an encoder for converting UTF-8 text to the GSM 03.38 encoding, and a socket wrapper. The socket wrapper provides connection pool, IPv6 and timeout monitoring features on top of PHP's socket extension.

This lib requires the [sockets](http://www.php.net/manual/en/book.sockets.php) PHP-extension, and is not supported on Windows. A [windows-compatible](https://github.com/onlinecity/php-smpp/tree/windows-compatible) version is also available.

Class Features
--------------

[](#class-features)

- You can’t connect as a transceiver, otherwise supported by SMPP v.3.4
- The SUBMIT\_MULTI operation of SMPP, which sends a SMS to a list of recipients, is not supported atm. You can easily add it though
- The sockets will return false if the timeout is reached on read() (but not readAll or write) You can use this feature to implement an enquire\_link policy. If you need to send enquire\_link for every 30 seconds of inactivity, set a timeout of 30 seconds, and send the enquire\_link command after `$smpp -> read()` returns false
- Multipart/alternative emails for mail clients that do not read HTML email
- Add attachments, including inline
- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings
- SMPP authentication with LOGIN mechanisms over Sockets transports
- Protect against header injection attacks
- Compatible with PHP 5.5 and later
- Namespaced to prevent name clashes

License
-------

[](#license)

This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read LICENSE for information on the software availability and distribution.

Installation &amp; loading
--------------------------

[](#installation--loading)

PHPSMPP is available on [Packagist](https://packagist.org/packages/seasonsolution/phpsmpp) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPSMPP. Just add this line to your `composer.json` file:

```
"seasonsolution/phpsmpp": "*.*"
```

or run

```
composer require seasonsolution/phpsmpp
```

Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPSMPP.

Basic usage example
-------------------

[](#basic-usage-example)

To send a SMS you can do:

```
