PHP code example of sendee / sendee-php

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

    

sendee / sendee-php example snippets


// Send a single SMS using Sendee's REST API and PHP

$apiKey = "1|ZXXXXXX";

$client = new Sendee\SendeePhp\SendeeClient($apiKey);
$message =  $client->sendMessage(
  '+15555559410', // Text this Number
  [
    'from' => '+15555558108', // From a valid Twilio number
    'body' => 'Queue me up with Sendee'
  ]
);

print $message;


// Send a multiple SMS with the same body using Sendee's REST API and PHP

$apiKey = "1|ZXXXXXX";

$client = new Sendee\SendeePhp\SendeeClient($apiKey);
$message =  $client->sendBulkMessage(
  '+15555558108', // From a valid Twilio Number
  [
    'to' => [ // Text this array of numbers
        '+15555559410','+15555559411','+15555559412',
    ],
    'body' => 'this is an api test bulk'
   ]
);

print $message;

composer