Sms Global api for Zend Framework (working)
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();Ultima modifica di il .
Nessun articolo correlato. / No related posts.
Contrassegnato con library, sms, smsglobal, zend framework
Trackback dal tuo sito.
Commenti (1)
Send SMS via web and API with the lowest fares and custom sender ID - Sdm Studio
| #
[...] Zend Framework library. The right Zend Framework library can be downloaded here. [...]
Rispondi