Sending an SMS using the PHP/HTTP API

  1.     <?php
  2.     /* Include PanaceaApi class */
  3.     require_once("panacea_api.php");

  4.     $api = new PanaceaApi();
  5.     $api->setUsername("demouser");
  6.     $api->setPassword("demouser");
  7.  
  8.     $result = $api->message_send("27111234567", "Hello", "27111236846"); 

  9.     if($api->ok($result)) {
  10.     echo "Message sent! ID was {$result['details']}\n";
  11.     } else {
  12.     /* There was an error */
  13.     echo $api->getError();
  14.     }
  15.  
  16.     ?>