Panacea Mobile Help Centre
  • 👋Welcome to Panacea Mobile!
  • Overview
    • Getting Started
    • Multipart SMS
    • Unicode Characters
    • SMS Delivery Statuses
      • Troubleshooting SMS Delivery
    • Compliance
    • FAQs
    • International SMS
      • 🚧Country Regulations & Requirements (under construction)
  • How To Guides
    • Panacea Mobile Dashboard
    • Send a single SMS
    • Send batch campaigns
    • Send personalised batch campaigns
    • Inbox
    • Inbound Triggers
    • SMS Numbers
    • Blocked Numbers & Opt-Outs
    • Sub Accounts
    • Reporting
    • Adding prepaid credits
    • Account Settings
      • My Profile
      • My Billing
      • Security
  • Developers
    • HTTPS API
      • Single Sends
      • Batch Sends
      • Delivery Reports via API
      • Receiving Inbound SMS
      • API Response Code
      • API Keys
      • Examples
        • PHP
          • PHP API Example
          • Simple SMS Send
          • Bulk SMS Send
          • Batch Create
          • Batch Create (.zip)
          • Message Status
        • Python
          • Python API Example
    • SMPP API
      • SMPP Connection Details
  • USSD
    • What is USSD?
    • USSD Campaigns
    • Integration with your server
  • Reseller Platform
    • Reseller Platform Features
    • Getting Started
    • Reseller Settings
    • Managing Your Customer Accounts
    • Branded Platform Example
    • FAQs
Powered by GitBook
On this page

Was this helpful?

  1. Developers
  2. HTTPS API
  3. Examples
  4. PHP

Bulk SMS Send

<?php 
require_once("panacea_api.php");

/* This sample demonstrates how to send multiple actions to the API in a single request */

$api = new PanaceaApi();
$api->setUsername("demouser");
$api->setPassword("demouser");

/* Now we must change mode from immediate to delayed */

$api->performActionsImmediately(false);

/* Let's queue our requests */
$api->message_send("27111234567", "Message 1", "27111234567");
$api->message_send("27111234568", "Message 2", "27111234568");
$api->message_send("27111234569", "Message 3", "27111234569");

/* Now let's send them */
$results = $api->execute_multiple();

if($api->ok($results)) {
	/* API Received the requests, we can now process each individual action's result */
	
	foreach($results['details'] as $result) {
		if($api->ok($result)) {
			/* Successful result */
			
		} else {

		}
	}
	
}

?>
PreviousSimple SMS SendNextBatch Create

Last updated 12 months ago

Was this helpful?