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 packagePrerequisites
- a working Zend Framework Project
- for these installation instructions: a default Zend Framework project with default directory structure
Installation
- Copy the folder SmsGlobal contained in this archive in PROJECT/library/ (just where the directory Zend is, or other user libraries)
- 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.
[...] Zend Framework library. The right Zend Framework library can be downloaded here. [...]