PHP code example of yvesniyo / intouch-sms

1. Go to this page and download the library: Download yvesniyo/intouch-sms library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

yvesniyo / intouch-sms example snippets


use Yvesniyo\IntouchSms\SmsSimple;

/** @var \Yvesniyo\IntouchSms\SmsSimple */
$sms = new SmsSimple();
$sms->recipients(["250780588642","0720710379"])
    ->message("Hello world")
    ->sender("intouchSenderId")
    ->username("intouchUsername")
    ->password("intouchPassword")
    ->apiUrl("www.intouchsms.co.rw/api/sendsms/.json")
    ->callBackUrl("");
print_r($sms->send());




class Sms extends SmsAbstract
{
    public function __construct()
    {
        parent::__construct();

        //
    }

    public function configSender(): string
    {
        return "intouchSenderId";
    }

    public function configUsername(): string
    {
        return "intouchUsername";
    }

    public function configPassword(): string
    {
        return "intouchPassword";
    }

    public function configApiUrl(): string
    {
        return "www.intouchsms.co.rw/api/sendsms/.json";
    }

    public function configCallBackUrl(): string
    {
        return "";
    }


    public static function QuickSend($recipients, String $message, String $senderId = null)
    {
        $sms = new Sms();
        $sms->


$sms = new Sms();
// first parameter is recipients and second one is message
$sms->