Download the PHP package timefrontiers/php-sms without Composer

On this page you can find all versions of the php package timefrontiers/php-sms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-sms

timefrontiers/php-sms

Multi‑driver SMS messaging for PHP 8.4+. Handles outbound sends, delivery webhooks, message logging, and driver‑based routing with automatic continent selection.


Requirements


Installation


Database

Run sql/install.sql against your messaging database (e.g. messaging) to create the sms table.

Migrating from linktude/php-sms? See sql/migrate.sql.


Configuration

Call Sms::configure() once in your application bootstrap, before any SMS message is sent.

You can override any driver setting at send time.


Usage

Sending an SMS

send() returns a Sms instance (with status = 'sent') on success, or false on failure. Errors are accessible via the HasErrors trait (_userError, _systemError). Read them with InstanceError (rank‑filtered).

You may also call sendAndWait() — an alias that keeps API symmetry for future async support.

Override defaults per message

If driver is not supplied, the package resolves the driver according to region_strategy:

Message lookups

Delivery reports (webhooks)

Handle incoming status callbacks from Twilio or AfricasTalking with a single static call:

If you need a fully custom delivery endpoint, you can instantiate a driver directly and call its verifyDeliveryReport / parseDeliveryReport methods.


Message entity

The Sms class represents a single row in the sms table and uses DatabaseObject + Pagination + HasErrors.

Public getters

Method Returns Description
id() ?int Auto‑increment primary key
code() ?string 828-prefixed 15‑char unique code
status() string pending, queued, sent, failed, delivered
messageId() ?int Parent message ID (for reply chains)
direction() string outbound or inbound
user() string Owner code (default 'SYSTEM')
batch() ?string Batch group code
sender() string Sender ID / phone used
receiver() string Recipient phone number
message() string Message body (max 250 chars)
messagePages() int Calculated message parts (1‑5)
fees() float Cost incurred
feesCurrency() ?string Currency of the fee
reference() ?string Provider‑assigned ID
meta() ?array Driver‑specific metadata (decoded JSON)

Pagination

The Pagination trait is available:

Query Builder


Custom drivers

Implement TimeFrontiers\Sms\Driver\SmsDriverInterface:

Register it in configuration:

Then pass 'driver' => 'mydriver' when sending.


Error handling


Database migration

If you are upgrading from linktude/php-sms:

  1. Run sql/migrate.sql to update the schema.
  2. Then call Sms::populateMissingCodes($conn) to fill the new code column with unique 828‑prefixed identifiers.

License

MIT


All versions of php-sms with dependencies

PHP Build Version
Package Version
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package timefrontiers/php-sms contains the following files

Loading the files please wait ...