GithubHelp home page GithubHelp logo

cleansms's Introduction

logo

Latest Stable Version License Total Downloads Dependents

Introduction

This PHP package enables you to easily send SMS using CleanSMS Service. It has an elegant syntax, and it is very easy to install and use.

Just few steps, and it's ready.

Create an account on CleanSMS, configure it and generate API Key. Then, let's start.

Installation

This package can be installed via composer. Just type :

composer require undjike/cleansms

This will download everything needed for the package to work in your project.

Usage

After installation, you can send SMS.

use Undjike\CleanSmsPhp\CleanSms;

CleanSms::create()
     ->apiKey('SMS_API_KEY')
     ->email('YOUR_CLEANSMS_EMAIL')
     ->sendSms(
         'MESSAGE_TO_SEND',
         'RECEIVER_PHONE_NUMBER Phone number (Ex: "+237*****") or array of phone numbers (Ex: ["+237*****", "+245*****", ...])'
     );

/**
    Return true if the message is successfully sent, false if not.
    The response can be a JSON in some cases like 'no balance'.
*/

Note: RECEIVER_PHONE_NUMBER can be an array of valid phone numbers, or a string containing a single number.

You can query your account balance using this package.

use Undjike\CleanSmsPhp\CleanSms;

CleanSms::create()
     ->apiKey('SMS_API_KEY')
     ->email('YOUR_CLEANSMS_EMAIL')
     ->getCredit();

/**
    Return the number of SMS remaining in your account. (Ex: 44)
*/

License

The MIT License (MIT). Please see License File for more information.

cleansms's People

Contributors

undjike avatar

Stargazers

 avatar  avatar

Watchers

 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.