PHPackages                             mihaiomg/webalert - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mihaiomg/webalert

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mihaiomg/webalert
=================

A Laravel bridge to https://www.webalert.ro

013PHP

Since Jun 13Pushed 2y agoCompare

[ Source](https://github.com/mihaiomg/webalert)[ Packagist](https://packagist.org/packages/mihaiomg/webalert)[ RSS](/packages/mihaiomg-webalert/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/be99b07bbcc06d1537421ac90ffde8e496f2ef3058f25a24c9d419294a9fa9ba/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d696861696f6d672f776562616c6572742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/mihaiomg/webalert/?branch=main)

Laravel WebAlert
================

[](#laravel-webalert)

The  turn your Android phone into a SMS gateway and provide a friendly API to help us send and receive SMS messages.

This package help you to send SMS through the WebAlert from your Laravel APP.

Send Single Message
===================

[](#send-single-message)

```
try {
    // Send a message using the primary device.
    $msg = sendSingleMessage("+11234567890", "This is a test of single message.");

    // Send a message using the Device ID 1.
    $msg = sendSingleMessage("+11234567890", "This is a test of single message.", 1);

    // Send a prioritize message using Device ID 1 for purpose of sending OTP, message reply etc…
    $msg = sendSingleMessage("+11234567890", "This is a test of single message.", 1, null, false, null, true);

    // Send a MMS message with image using the Device ID 1.
    $attachments = "https://example.com/images/footer-logo.png,https://example.com/downloads/sms-gateway/images/section/create-chat-bot.png";
    $msg = sendSingleMessage("+11234567890", "This is a test of single message.", 1, null, true, $attachments);

    // Send a message using the SIM in slot 1 of Device ID 1 (Represented as "1|0").
    // SIM slot is an index so the index of the first SIM is 0 and the index of the second SIM is 1.
    // In this example, 1 represents Device ID and 0 represents SIM slot index.
    $msg = sendSingleMessage("+11234567890", "This is a test of single message.", "1|0");

    // Send scheduled message using the primary device.
    $msg = sendSingleMessage("+11234567890", "This is a test of schedule feature.", null, strtotime("+2 minutes"));
    print_r($msg);

    echo "Successfully sent a message.";
} catch (Exception $e) {
    echo $e->getMessage();
}

```

Send Bulk Messages
==================

[](#send-bulk-messages)

```
$messages = array();

for ($i = 1; $i  "+11234567890",
            "message" => "This is a test #{$i} of PHP version. Testing bulk message functionality."
        ]);
}

try {
    // Send messages using the primary device.
    sendMessages($messages);

    // Send messages using default SIM of all available devices. Messages will be split between all devices.
    sendMessages($messages, USE_ALL_DEVICES);

    // Send messages using all SIMs of all available devices. Messages will be split between all SIMs.
    sendMessages($messages, USE_ALL_SIMS);

    // Send messages using only specified devices. Messages will be split between devices or SIMs you specified.
    // If you send 12 messages using this code then 4 messages will be sent by Device ID 1, other 4 by SIM in slot 1 of
    // Device ID 2 (Represendted as "2|0") and remaining 4 by SIM in slot 2 of Device ID 2 (Represendted as "2|1").
    sendMessages($messages, USE_SPECIFIED, [1, "2|0", "2|1"]);

    // Send messages on schedule using the primary device.
    sendMessages($messages, null, null, strtotime("+2 minutes"));

    // Send a message to contacts in contacts list with ID of 1.
    sendMessageToContactsList(1, "Test", USE_SPECIFIED, 1);

    // Send a message on schedule to contacts in contacts list with ID of 1.
    sendMessageToContactsList(1, "Test", null, null, strtotime("+2 minutes"));

    // Array of image links to attach to MMS message;
    $attachments = [
        "https://example.com/images/footer-logo.png",
        "https://example.com/downloads/sms-gateway/images/section/create-chat-bot.png"
    ];
    $attachments = implode(',', $attachments);

    $mmsMessages = [];
    for ($i = 1; $i  "+11234567890",
                "message" => "This is a test #{$i} of PHP version. Testing bulk MMS message functionality.",
                "type" => "mms",
                "attachments" => $attachments
            ]);
    }
    // Send MMS messages using all SIMs of all available devices. Messages will be split between all SIMs.
    $msgs = sendMessages($mmsMessages, USE_ALL_SIMS);

    print_r($msgs);

    echo "Successfully sent bulk messages.";
} catch (Exception $e) {
    echo $e->getMessage();
}

```

Get remaining message credits
=============================

[](#get-remaining-message-credits)

```
try {
    $credits = getBalance();
    echo "Message Credits Remaining: {$credits}";
} catch (Exception $e) {
    echo $e->getMessage();
}

# Get messages and their current status
try {
    // Get a message using the ID.
    $msg = getMessageByID(1);
    print_r($msg);

    // Get messages using the Group ID.
    $msgs = getMessagesByGroupID(')V5LxqyBMEbQrl9*J$5bb4c03e8a07b7.62193871');
    print_r($msgs);

    // Get messages received in last 24 hours.
    $msgs = getMessagesByStatus("Received", null, null, time() - 86400);

    // Get messages received on SIM 1 of device ID 8 in last 24 hours.
    $msgs = getMessagesByStatus("Received", 8, 0, time() - 86400);
    print_r($msgs);
} catch (Exception $e) {
    echo $e->getMessage();
}

```

Resend messages
===============

[](#resend-messages)

```
try {
    // Resend a message using the ID.
    $msg = resendMessageByID(1);
    print_r($msg);

    // Get messages using the Group ID and Status.
    $msgs = resendMessagesByGroupID('LV5LxqyBMEbQrl9*J$5bb4c03e8a07b7.62193871', 'Failed');
    print_r($msgs);

    // Resend pending messages in last 24 hours.
    $msgs = resendMessagesByStatus("Pending", null, null, time() - 86400);

    // Resend pending messages sent using SIM 1 of device ID 8 in last 24 hours.
    $msgs = resendMessagesByStatus("Received", 8, 0, time() - 86400);
    print_r($msgs);
} catch (Exception $e) {
    echo $e->getMessage();
}

```

Manage Contacts
===============

[](#manage-contacts)

```
try {
    // Add a new contact to contacts list 1 or resubscribe the contact if it already exists.
    $contact = addContact(1, "+11234567890", "Test", true);
    print_r($contact);

    // Unsubscribe a contact using the mobile number.
    $contact = unsubscribeContact(1, "+11234567890");
    print_r($contact);
} catch (Exception $e) {
    echo $e->getMessage();
}

```

Send USSD request
=================

[](#send-ussd-request)

```
try {
    // Send a USSD request using default SIM of Device ID 1.
    $ussdRequest = sendUssdRequest("*150#", 1);
    print_r($ussdRequest);

    // Send a USSD request using SIM in slot 1 of Device ID 1.
    $ussdRequest = sendUssdRequest("*150#", 1, 0);
    print_r($ussdRequest);

    // Send a USSD request using SIM in slot 2 of Device ID 1.
    $ussdRequest = sendUssdRequest("*150#", 1, 1);
    print_r($ussdRequest);
} catch (Exception $e) {
    echo $e->getMessage();
}

```

Get USSD requests
=================

[](#get-ussd-requests)

```
try {
    // Get a USSD request using the ID.
    $ussdRequest = getUssdRequestByID(1);
    print_r($ussdRequest);

    // Get USSD requests with request text "*150#" sent in last 24 hours.
    $ussdRequests = getUssdRequests("*150#", null, null, time() - 86400);
    print_r($ussdRequests);
} catch (Exception $e) {
    echo $e->getMessage();
}

```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity22

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/68403fdc59d6bb6a8903cb4e3259749463862fcc138263aa9bc2b55cc640e6eb?d=identicon)[mihaomg](/maintainers/mihaomg)

---

Top Contributors

[![mihaiomg](https://avatars.githubusercontent.com/u/64732932?v=4)](https://github.com/mihaiomg "mihaiomg (8 commits)")

### Embed Badge

![Health badge](/badges/mihaiomg-webalert/health.svg)

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

PHPackages © 2026

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