Download the PHP package rungopher/simplesms without Composer
On this page you can find all versions of the php package rungopher/simplesms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rungopher/simplesms
More information about rungopher/simplesms
Files in rungopher/simplesms
Package simplesms
Short Description This library provides an easy way to interact with the Rungopher SimpleSms API
License MIT
Informations about the package simplesms
Rungopher SimpleSMS PHP Library
This library provides an easy way to interact with the Rungopher SimpleSms API.
Installation
Distributed via packagist. The suggested installation method is via composer:
Usage
Sending an SMS:
Note: This example uses cURL which requires the cURL PHP Extension. To use a custom requester see Using a Custom Requester below.
Error: SimpleSmsErrorException
is thrown containing the error message.
Success: $client->sendSms()
returns an instance of SimpleSmsOutbound which has the following methods:
Method | Response Field |
---|---|
getFrom() | from |
getTo() | to |
getBody() | body |
getMessageSid() | sid |
getStatus() | status |
Receiving a Delivery Receipt:
SimpleSmsDeliveryReceipt:
Method | Response Field |
---|---|
getMessageSid() | MessageSid |
getStatus() | Status |
wasDelivered() | NA |
failed() | NA |
Receiving an Inbound SMS:
SimpleSmsInbound:
Method | Response Field |
---|---|
getFrom() | From |
getTo() | To |
getBody() | Body |
getMessageSid() | MessageSid |
Using a Custom Requester
A custom requester must implement RequesterInterface
:
SimpleSmsRequest:
Method | Returns |
---|---|
getBody() | The request body. |
getUrl() | The request url. |
getPort() | The request port. |
getUsername() | The request username. |
getPassword() | The request password. |
SimpleSmsResponse:
Property | Description |
---|---|
statusCode | The request http status code. |
response | The request response body. |