PHP code example of eddieodira / messager

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

    

eddieodira / messager example snippets


composer 

use Eddieodira\Messager\Sender;
$configData = [
  'apiEndPoint' => 'xxxxxxxxxxxxxxxxxx',
  'userId' => 'xxxxxxxxxxxxxxxxx', 
  'password' => 'xxxxxxxxxxxxxxxx', 
  'apiKey' => 'xxxxxxxxxxxxxxxxxxxx',
  'senderId' => 'xxxxxxxxxxxxxxxxxxx',
];

$hostpinnacle = new Sender($configData);
$hostpinnacle->setSendMethod('quick');
$hostpinnacle->setPhone('2547xxxxxxxx'); //You can only use mobile phone numbers in the format: 254721000000 or +254721000000
$hostpinnacle->setMessage('Hello, I am just testing this applications');
$hostpinnacle->sendMessage();
echo $hostpinnacle->getResponse();

use Eddieodira\Messager\Sender;
$configData = [
  'apiEndPoint' => 'xxxxxxxxxxxxxxxxxx',
  'userId' => 'xxxxxxxxxxxxxxxxx', 
  'password' => 'xxxxxxxxxxxxxxxx', 
  'apiKey' => 'xxxxxxxxxxxxxxxxxxxx', //You can leave this blank: 'apiKey' => '' if you have the other credentials
  'senderId' => 'xxxxxxxxxxxxxxxxxxx',
];

$hostpinnacle = new Sender($configData);
$hostpinnacle->setSendMethod('quick');
$hostpinnacle->setPhone('25472xxxxxxx, 25475xxxxxxx, 25476xxxxxxx'); //You can only use mobile phone numbers in the format: 254721000000 or +254721000000
$hostpinnacle->setMessage('Hello, I am just testing this applications');
$hostpinnacle->sendMessage();
echo $hostpinnacle->getResponse();

use Eddieodira\Messager\Sender;
$configData = [
  'apiEndPoint' => 'xxxxxxxxxxxxxxxxxx',
  'userId' => 'xxxxxxxxxxxxxxxxx', 
  'password' => 'xxxxxxxxxxxxxxxx', 
  'apiKey' => 'xxxxxxxxxxxxxxxxxxxx', //You can leave this blank: 'apiKey' => '' if you have the other credentials
  'senderId' => 'xxxxxxxxxxxxxxxxxxx',
];

$hostpinnacle = new Sender($configData);
$hostpinnacle->setSendMethod('quick');
$hostpinnacle->setPhone('25472xxxxxxx, 25475xxxxxxx, 25476xxxxxxx'); //You can only use mobile phone numbers in the format: 254721000000 or +254721000000
$hostpinnacle->setScheduleTime("2024-04-25 09:46:00");
$hostpinnacle->setMessage('Hello, I am just testing this applications');
$hostpinnacle->sendMessage();
echo $hostpinnacle->getResponse();