Sdm Studio


dicembre 26th, 2011

Sms Global api for Zend Framework (working)

Approfondimenti, Programming, by Emilio Alfredo Lodigiani.
The popular Australian SMS provider Sms Global is releasing an API to use its services form a Zend Framework application. Unfortunately the code they are releasing is not working. It has lots of errors, that make the code unusable. The not working code is freely distributed from SmsGlobal here. I have recently downloaded and corrected the code, that now works perfectly in Zend Framework 1.11+. You can download the working library from the link below.

Download

Download package

Prerequisites

  • a working Zend Framework Project
  • for these installation instructions: a default Zend Framework project with default directory structure

Installation

  1. Copy the folder SmsGlobal contained in this archive in PROJECT/library/ (just where the directory Zend is, or other user libraries)
  2. Open the application.ini file (PROJECT/application/configs/application.ini) and add this line in [production] section: autoloaderNamespaces[] = "SmsGlobal_"

Usage

Example usage can be found in SmsGlobal directory (Sample.php). In your Zend controller you can use the library like this:
$smsAdapter = new SmsGlobal_Sms_Adapter_Http('username', 'password');
$sms = new SmsGlobal_Sms($smsAdapter);
$sms->setOrigin('61447100250');
$sms->setIsTwoWay(false); //if true the Origin is ignored and sent from a special number
$sms->addDestination('61447100250')
    ->addDestination('61447100251')
    ->addDestination('61447100252');
$sms->setMessage('Test message');
$sms->send();

Nessun articolo correlato. / No related posts.

Back Top

Risposte a“Sms Global api for Zend Framework (working)”

  1. Ancora nessun commento
  1. Send SMS via web and API with the lowest fares and custom sender ID - Sdm Studio (,26 dicembre 2011)

    [...] Zend Framework library. The right Zend Framework library can be downloaded here. [...]

Lascia un Commento

L'indirizzo email non verrĂ  pubblicato. I campi obbligatori sono contrassegnati *

*