cronario / messenger-alphasms
Send sms Messages
Installs: 5 708
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2023-03-09 11:01:20 UTC
README
This package provides packagist access to php api for alphasms provider.
Usage
<?php require_once('./vendor/autoload.php'); //init class with your login/password $sms = new SMSclient('qwerty', 'qwerty', 'API_KEY'); /* sendSMS(from (phone, name),to phone, message, timestamp when to send sms, wap-push link, flash flag (bool)); */ //send on SMS and receive it's id for tracking //message in UTF-8 $id = $sms->sendSMS('AlphaSMS', '380931234567', 'Текст сообщения на русском языка в UTF-8 любой длинны'); //send WAP-PUSH message //$id = $sms->sendSMS('Alpha Name','0931234567', 'Самый классный сайт!', time(), 'http://alphasms.com.ua/'); //send flash message at certain time //$id = $sms->sendSMS('80501234567','80931234567', 'Flash message in english letters only!', strtotime('+1 minute'), '', 1); //just for usage - text can be translierated to use less symbols in sms //echo SMSclient::translit('Текст сообщения на русском языка в UTF-8 любой длинны'); //if no ID - then message is not sent and you should check errors if($sms->hasErrors()) die(var_dump($sms->getErrors())); else var_dump($id); //doing something interesting... sleep(20); //track message status after about 0,5 minute. $res = $sms->receiveSMS($id); var_dump($res); var_dump($sms->getResponse());//full data //get amount of money in account var_dump($sms->getBalance());