Download the PHP package weezqyd/africastalking without Composer

On this page you can find all versions of the php package weezqyd/africastalking. 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 africastalking

Geting Started

Install the package from composer

You then need to install one of the following: But we recomend GuzzleHttp

Configure the Adapter

This package uses guzzlehttp as the default adapter, if you decide to use another http client good for you all you need is to configure your client and pass the adapter as the fourth parameter to the gateway's constructor. You can also create your own adapter as long as it implements Http\Adapter\AdapterInterface.

An example is worth a thousand words

Sending an SMS Message

Now let us send an SMS notification

Passing additional options

The SMS API accept additional options to be passed allong with the request

Parameter Description
from Shortcode or alphanumeric that is registered with your Africa's Talking account. If missing, the default value (20414) will be populated on the message
enqueue This parameter is used for Bulk SMS clients that would like deliver as many messages to the API before waiting for an Ack from the Telcos. If enabled, the API will store the messages in its databases and send them out asynchronously after responding to the request
keyword This parameter is used for premium services. It is essential for subscription premium services.
linkId This parameter is used for premium services to send OnDemand messages. We forward the linkId to your application when the user send a message to your service
retryDurationInHours This parameter is used for premium messages. It specifies the number of hours your subscription message should be retried in case it's not delivered to the subscriber.

Send with options

Sending to multiple recipients

At times you would want to do somthing with the API response. Well worry no more. To acheive this pass a callback funtion as the fourth parameter of the sendMessage() method. This callback will be run for each message that is sent


All versions of africastalking with dependencies

PHP Build Version
Package Version
Requires weezqyd/http-adapters Version ^0.0.1
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 weezqyd/africastalking contains the following files

Loading the files please wait ....