2017 © Pedro PelĆ”ez
 

library osms

PHP library wrapper of the Orange SMS API.

image

ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

  • Wednesday, April 13, 2016
  • by ismaelt
  • Repository
  • 6 Watchers
  • 23 Stars
  • 4,784 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 22 Forks
  • 0 Open issues
  • 8 Versions
  • 2 % Grown

The README.md

Osms

A PHP library to access Orange SMS API., (*1)

Current version: 2.0.1, (*2)

Installation

Install Composer. Then, do:, (*3)

$ composer require ismaeltoe/osms

Without Composer

Simply download the latest release., (*4)

Loading

You can load the class using Composer's autoloading:, (*5)

require 'vendor/autoload.php';

Otherwise, you can simply require the file directly:, (*6)

require 'path/to/Osms.php';

Quick Start

Case 1: You have no access token, (*7)

require 'vendor/autoload.php';

use \Osms\Osms;

$config = array(
    'clientId' => 'your_client_id',
    'clientSecret' => 'your_client_secret'
);

$osms = new Osms($config);

// retrieve an access token
$response = $osms->getTokenFromConsumerKey();

if (!empty($response['access_token'])) {
    $senderAddress = 'tel:+22500000000';
    $receiverAddress = 'tel:+22500000000';
    $message = 'Hello World!';
    $senderName = 'Optimus Prime';

    $osms->sendSMS($senderAddress, $receiverAddress, $message, $senderName);
} else {
    // error
}

Case 2: You have an access token, (*8)

require 'vendor/autoload.php';

use \Osms\Osms;

$config = array(
    'token' => 'your_access_token'
);

$osms = new Osms($config);

$senderAddress = 'tel:+22500000000';
$receiverAddress = 'tel:+22500000000';
$message = 'Hello World!';
$senderName = 'Optimus Prime';

$osms->sendSMS($senderAddress, $receiverAddress, $message, $senderName);

Check out examples for more examples., (*9)

CHECK OUT also Osms.php to see all the methods available. But DON'T MODIFY IT. You can extend the class to add your own stuff., (*10)

SSL certificate problem

If you get an SSL error, set the peer's certificate checking option to false:, (*11)

$osms = new Osms();
$osms->setVerifyPeerSSL(false);

But it should work on your hosting server, so enable the certificate checking when you are ready to deploy your application for security reasons., (*12)

Documentation

Other Libraries

License

Released under the MIT License - see LICENSE.txt for details., (*13)

The Versions

13/04 2016

dev-master

9999999-dev https://github.com/ismaeltoe/osms-php

PHP library wrapper of the Orange SMS API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Ismael ToƩ

api curl php json rest sms restful client web service requests http client orange

22/09 2015

v2.0.1

2.0.1.0 https://github.com/ismaeltoe/osms-php

PHP library wrapper of the Orange SMS API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Ismael ToƩ

api curl php json rest sms restful client web service requests http client orange

21/09 2015

v2.0

2.0.0.0 https://github.com/ismaeltoe/osms-php

PHP library wrapper of the Orange SMS API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Ismael ToƩ

api curl php json rest sms restful client web service requests http client orange

15/07 2015

v1.1.0

1.1.0.0 https://github.com/ismaeltoe/osms-php

PHP library wrapper of the Orange SMS API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Ismael ToƩ

api curl php json rest sms restful client web service requests http client orange

09/06 2015

v1.0.3

1.0.3.0 https://github.com/ismaeltoe/osms-php

PHP library wrapper of the Orange SMS API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Ismael ToƩ

api curl php json rest sms restful client web service requests http client orange

11/04 2015

v1.0.2

1.0.2.0 https://github.com/ismaeltoe/osms-php

PHP library wrapper of the Orange SMS API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Ismael ToƩ

api curl php json rest sms restful client web service requests http client orange

11/04 2015

v1.0.1

1.0.1.0 https://github.com/ismaeltoe/osms-php

PHP library wrapper of the Orange SMS API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Ismael ToƩ

api curl php json rest sms restful client web service requests http client orange

10/04 2015

v1.0.0

1.0.0.0 https://github.com/ismaeltoe/osms-php

PHP library wrapper of the Orange SMS API.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Ismael ToƩ

api curl php json rest sms restful client web service requests http client orange