ianchadwick/dynmark

Send SMS using Dynmark - http://www.dynmark.com/

dev-master 2016-08-25 16:27 UTC

This package is not auto-updated.

Last update: 2024-04-24 13:17:51 UTC


README

Dynmark are leading providers of SMS and SMS intelligence services allowing you to make your SMS messaging smart.

This package allows you to send text messages using their API.See website

Requirements

PHP 5.4+

Installation using Composer

Add ianchadwick/dynmark to the require part of your composer.json file

"require": {
  "ianchadwick/dynmark": "dev-master"
}

Then update your project with composer

composer update

Basic Usage

use Dynmark\Dynmark;
use Dynmark\Commands\Sms\Send;

class MyClass {
  public function sendSms()
  {
    // init the Dynmark helper
    $dynmark = new Dynmark('myusername', 'mypassword');
    
    // create the command
    $command = new Send($dynmark);

    // set the text details
    $command->setFrom('Ian')
        ->setPhone('0770000000')
        ->setText('Hello there!');
    
    // send the text
    $response = $command->fire();
  }
}