PHPackages                             hebinet/websmscom-php - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. hebinet/websmscom-php

Abandoned → [hebinet/websms-client](/?search=hebinet%2Fwebsms-client)Library[HTTP &amp; Networking](/categories/http)

hebinet/websmscom-php
=====================

A lightweight PHP-client-library for using websms.com SMS services.

v2.0.5(4y ago)0714MITPHPPHP ^8.0

Since Apr 24Pushed 4y agoCompare

[ Source](https://github.com/hebinet/websms-client)[ Packagist](https://packagist.org/packages/hebinet/websmscom-php)[ Docs](https://github.com/hebinet/websms-client)[ RSS](/packages/hebinet-websmscom-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (5)Versions (17)Used By (0)

What is it?
===========

[](#what-is-it)

A lightweight PHP-client-library for using websms.com SMS services. Reduces the complexity of network-communication between client and SMS gateway, to help business-customer save time and money for focusing on their business logic.

Why this fork
=============

[](#why-this-fork)

Rewrote complete SDK to meet the newest coding standards and utilize modern libraries.

Added the following improvements:

- Raised minimum required PHP version to 8.0+ (For PHP &lt;8.0 use v1.0.7.7)
- Use Namespaces
- Switched from kebab-case to CamelCase for properties and methods
- Used famous and well tested GuzzleHttp library instead of plain Curl or fsockopen
- Added PHPDoc style comments
- Used parameter type hints in methods to ensure certain var types and removed unnecessary type checking
- Removed JSON.phps dependency and used native php json extension instead
- Raised client version to that one mentioned in the original readme file

But most of all, I did it for fun :)

Installation
============

[](#installation)

composer require hebinet/websms-client

Example
=======

[](#example)

```
// First create the WebSms client

// via username/password
$client = new WebSms\Client($gatewayUrl, $username, $password);
// or via TokenAuth
$client = new WebSms\Client($gatewayUrl, $authToken, null, AuthenticationMode::ACCESS_TOKEN);

// Then create an Message object with the recipients and the message
$message = new WebSms\TextMessage(['4366412345678'], 'Test Message');

// To send the message, just call the send method on the client
$response = $client->send($message);
```

and here the content of the original send\_sms.php file "translated" to the new classes

```
