PHP code example of savannabits / advantasms

1. Go to this page and download the library: Download savannabits/advantasms 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/ */

    

savannabits / advantasms example snippets


use \Savannabits\Advantasms\Advantasms;
$apiKey = "";
$partnerId = "";
$shortcode = "";
$mobile = "254xxxxxxxxx";
//instantiate
$sms = new Advantasms($apiKey,$partnerId,$shortcode);

//Send and receive response
$response = $sms->to($mobile)->message("Your message right here...")->send();

//Schedule sms to be sent at a specific time
$time = "2020-10-01 18:00"; // Y-m-d H:i
$response = $sms->to($mobile)->message("Your message right here")->schedule($time);

use \Savannabits\Advantasms\Advantasms;
$apiKey = "";
$partnerId = "";
$shortcode = "";
$mobile = "254xxxxxxxxx";

//Send and receive response
$response = Advantasms::init($apiKey,$partnerId,$shortcode)->to($mobile)->message("Your message right here...")->send();

//Schedule sms to be sent at a specific time
$time = "2020-10-01 18:00"; // Y-m-d H:i
$response = Advantasms::init($apiKey,$partnerId,$shortcode)->to($mobile)->message("Your message right here...")->schedule($time);