PHPackages                             navid59/web2sms - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. navid59/web2sms

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

navid59/web2sms
===============

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

10PHP

Since Aug 2Pushed 4y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)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.

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)

    ```
        ...

        require_once('lib/sendSMS.php');
        use Web2sms\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

### When / Why send SMS

[](#when--why-send-sms)

Now days sending SMS to the customers helping any business to increase customers retention.

Also, can can benefit of sending SMS in other scenarios as well For example : \* For phone verification of your app / site members \* To 2-Step verification \* To notify / reminding of an event \* Etc

##### Resources

[](#resources)

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

[](#-web2sms-documentation-)

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### 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 (28 commits)")

### Embed Badge

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

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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