jkb32/smslabs-php-sdk

PHP client for SMSLabs.pl

1.0.1 2022-05-30 14:11 UTC

This package is auto-updated.

Last update: 2024-03-29 04:40:01 UTC


README

Licence MIT Build Status Build Status Scrutinizer Code Quality Code Coverage SensioLabsInsight

This repository is a copy of "ittoolspl / php-lib-smslabs" repository because it has been removed from GitHub. All rights to this library are owned by its author.

Tags

  • v1.0 - deprecated tag without tests for PHP 5.6+
  • v2.0 - fully tested tag for PHP 5.6+
  • v3.0 - fully tested tag for PHP 7.0+

Installation

The recommended way to install the library is through Composer:

$ composer require jkb32/smslabs-php-sdk

Usage

Constructor:

$sms = new \Ittoolspl\Smslabs\SmslabsClient($appKey, $secret);

Send SMS:

$sms->setSenderId($numberOrSenderId)
    ->setExpirationMinutes($minutes) // optionally
    ->setSendDate($dateTime) // optionally
    ->setFlashMessage($isFlashMessage) // optionally
    ->add($number, $message)
    ->send();

Show queued SMS (before send())

$sms->getSmsQueue();

Get recently sent SMS status (after send()):

$sms->getSentStatus();

Get available SenderId:

$sms->getAvailableSenders();

Account Balance:

$sms->getAccountBalance();

Check incoming SMS:

$sms->getSmsIn();

Check sent SMS:

$sms->getSmsOut($offset, $limit);

Check details of SMS:

$sms->getSmsDetails();

Contributing

Feel free to contribute. If you've got any problems/ideas, please create new issue or develop new pull request.

License

php-lib-smslab is open-sourced software licensed under the MIT license.