Git Product home page Git Product logo

osms-php's Introduction

Osms

A PHP library to access Orange SMS API.

Installation

Install Composer. Then, simply do:

$ composer require ismaeltoe/osms

Loading

You can load the class using Composer's autoloading:

require 'vendor/autoload.php';

Otherwise, you can simply require the file directly:

require_once 'path/to/Osms.php';

Quick Start

require 'vendor/autoload.php';

use \Osms\Osms;

$osms = new Osms('your_client_id', 'your_client_secret', 'your_access_token');

$senderAddress = 'tel:+22500000000';
$receiverAddress = 'tel:+22501010101';
$message = 'Hello World!';

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

For more examples, see examples.

SSL certificate problem

When running your application in a local environment, you will get an SSL error. To make things work, set the peer's certificate checking option to false:

$osms = new Osms('your_client_id', 'your_client_secret', 'your_access_token', 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.

Links

Follow this link to know more about the Orange SMS API:

License

Released under the MIT License - see LICENSE.txt for details.

osms-php's People

Contributors

ismaeltoe avatar

Stargazers

Maud avatar

Watchers

James Cloos avatar Maud avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.