PHPackages                             web2sms/sms - 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. web2sms/sms

ActiveLibrary

web2sms/sms
===========

Set of library provides easy implementing to send SMS from any applications written in the PHP language via WEB2SMS services

v1.0.5(1y ago)248.4k↓20.4%Apache-2.0PHPPHP &gt;=5.5

Since Aug 3Pushed 1y ago3 watchersCompare

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

READMEChangelog (7)DependenciesVersions (8)Used By (0)

[![Parsedown](https://camo.githubusercontent.com/f10fe38b65fd6b4be98ace46d107cbfec77d028eebdc831c6ddf447fbb2c04e3/68747470733a2f2f7777772e77656232736d732e726f2f6173736574732f7468656d65732f7075626c69632f696d616765732f66726f6e742f6c6f676f2e706e67)](https://www.web2sms.ro)

WEB2SMS SRL
===========

[](#web2sms-srl)

### WEB2SMS Composer

[](#web2sms-composer)

Introduction
------------

[](#introduction)

The WEB2SMS PHP library provides easy access to the send SMS via WEB2SMS API from any applications written in the PHP language.

For more details, please do not hesitate to contact us -

Compatibility
-------------

[](#compatibility)

PHP 5.7.0 - 8.0.8

Installation
------------

[](#installation)

You can install the library via [Composer](http://getcomposer.org/). Run the following command:

```
    composer require web2sms/sms

```

### URLs

[](#urls)

- **WEB2SMS platform** :
- **POSTPAID endpoint** :
- **PREPAID endpoint** :

### Actions

[](#actions)

- #### **Send SMS**

    [](#send-sms)

    To send one / a set of **SMS** ,

    - **Prepaid action URL :** /prepaid/message/
    - **Postpaid action URL:** /send/message/
    - **Method:** `POST`

    #### An example

    [](#an-example)

    ```
        ...

        use Web2sms\Sms\SendSMS;
        $sendSMS = new SendSMS();

        $sender->accountType = 'prepaid';                                 // postpaid | prepaid          // Optional
        $sendSMS->apiKey     = 'API_KEY_FROM_THE_PLATFORM';               // ApiKey from Platform        // Mandatory
        $sendSMS->secretKey  = 'SECRET_KEY_FROM_THE_PLATFORM';            // secretKey from Platform     // Mandatory

        // SMS #1
        $sendSMS->messages[]  = [
                            'sender'            => ''          ,          // who send the SMS             // Optional
                            'recipient'         => '07XXXXXXXX',          // who receive the SMS          // Mandatory
                            'body'              => 'This is the actual content of SMS nr one',            // Mandatory
                            'scheduleDatetime'  => 'YYYY-MM-DD 10:20:10', // Date & Time to send SMS      // Optional
                            'validityDatetime'  => null,                  // Date & Time of expire SMS    // Optional
                            'callbackUrl'       => 'DOMAIN/XXX/',         // Full callback URL            // Optional
                            'userData'          => null,                  // User data                    // Optional
                            'visibleMessage'    => false                  // false / True                 // Optional
                            ];

        ...

        // SMS #N
        $sendSMS->messages[]  = [
                            'sender'            => ''          ,          // who send the SMS             // Optional
                            'recipient'         => '07XXXXXXXX',          // who receive the SMS          // Mandatory
                            'body'              => 'This is the actual content of SMS nr N'               // Mandatory
                            'scheduleDatetime'  => null,                  // Date & Time to send SMS      // Optional
                            'validityDatetime'  => null,                  // Date & Time of expire SMS    // Optional
                            'callbackUrl'       => 'DOMAIN/XXX/',         // Full callback URL            // Optional
                            'userData'          => null,                  // User data                    // Optional
                            'visibleMessage'    => false                  // false / True                 // Optional
                            ];

        $sendSMS->setRequest();
        $sendSMS->sendSMS();

        ...
    ```

    #### Parameters

    [](#parameters)

    - **accountType :** The "accountType" define the type of your account in WEB2SMS platform. WEB2SMS has two type of account, **"postpaid"** &amp; **"prepaid"** . The **prepaid** defined as default account Type.
    - **apiKey :** The "apiKey" is your unique ID to work with WEB2SMS API, this parameter is Mandatory.
    - **secretKey :** "secretKey" is another unique ID to work with WEB2SMS API, this parameter is also Mandatory.
    - **messages :** The "messages" is your actual SMS. You can define one message to be send as SMS, or define a **list of messages** to be send to your destination. As is shown in above example, any message of the list is individual, and can have diffrent configuration, text content or even send in diffrent time.

        - **sender :** The "sender" is the actual number, what will sending the SMS to the destination phone number. The sender is an optional parameter, and the phone number on destination will be apear as what is defined in the Platform. if you have several predefined number in the platform, so you can pickup one of them as SMS sender.
        - **recipient :** The "recipient" is the actual phone number of the SMS destination. This is a mandatory parameter.
        - **body :** The "body" is the actual content of the SMS. The "body" is a mandatory parameter.
        - **scheduleDatetime :** To set the **date &amp; time** of SMS sending. By setting this option you will be able to define one / set of SMS to be sent in any interval of time in the future . The format of this parameter is like : **Y-m-d H:i:s** as Ex. **2021-12-01 08:59:30** . this parameter is optional.
        - **validityDatetime :** To set a expire date &amp; time for SMS sending. This is an optional parameter.
        - **callbackUrl :** The "callBackUrl", is an URL from your website to sending the feedback for each individual SMS after SMS is send to the destination, to be informed about each individual SMS. This is an optional parameter.
        - **userData :** "userData" is an string given by you, to be used in the reports generated in the WEB2SMS platform. this option is helping you to categorize the informations. As example if you sending to many SMS for diffrent events, you can choese a **event title** as **userData** to be apear in the reports
        - **visibleMessage :** The "visibleMessage" option is to Hide &amp; Show the SMS content in WEB2SMS platform, to protect the sensitive Data . you can set this parameter as **TRUE** | **FALSE**. as defulte the SMS content is apearing in the platform. this parameter is optional.

### Error codes defination

[](#error-codes-defination)

- **536870913** : Internal web2SMS error
- **268435457** : No available account for the calling IP
- **268435463** : Associated account is disabled
- **268435462** : Associated account is missconfigured
- **268435464** : Internal web2SMS error while creating SMS Sender
- **268435458** : Parameter phone has a wrong format or it belongs to a GSM.Network that is not configured for the associated account!
- **268435466** : Phone number is black listed
- **268435520** : Phone number belongs to a GSN Network that is not configured for the associated account
- **268435460** : You’ve exceeded your monthly limit for SMS sending
- **268435488** : You are trying to schedule a SMS message outside the configured time interval restrictions
- **268435459** : Parameter message is empty! Empty message are not allowed
- **268435465** : Internal web2SMS error while scheduling a SMS

### Techincal support

[](#techincal-support)

mail :

##### Resources

[](#resources)

###### ( [WEB2SMS Documentation](https://sites.google.com/a/netopia-system.com/wiki-web2sms/api-web2sms-rest-client) )

[](#-web2sms-documentation-)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~205 days

Recently: every ~273 days

Total

7

Last Release

517d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/56802fa4e85f19470557478e315f143d806264be1de43ad0fdedb5a25a02244f?d=identicon)[navid](/maintainers/navid)

---

Top Contributors

[![navid59](https://avatars.githubusercontent.com/u/4462714?v=4)](https://github.com/navid59 "navid59 (15 commits)")[![dummyntp](https://avatars.githubusercontent.com/u/186559336?v=4)](https://github.com/dummyntp "dummyntp (2 commits)")[![dandarie](https://avatars.githubusercontent.com/u/9036450?v=4)](https://github.com/dandarie "dandarie (1 commits)")

### Embed Badge

![Health badge](/badges/web2sms-sms/health.svg)

```
[![Health](https://phpackages.com/badges/web2sms-sms/health.svg)](https://phpackages.com/packages/web2sms-sms)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
