kudinovfedor / sms-fly
SMS FLY API (XML)
dev-master
2022-07-17 15:21 UTC
Requires
- php: >=5.6|>=7.0
- ext-curl: *
- ext-json: *
- ext-simplexml: *
This package is auto-updated.
Last update: 2024-09-17 19:47:30 UTC
README
Installation
Require this package with composer using the following command:
composer require kudinovfedor/sms-fly
Usage
use KudinovFedor\SmsFly\SmsFly; $smsFly = new SmsFly([ 'login' => 'login', 'password' => 'password', 'from' => 'InfoCentr' // Alpha name ]); // or $smsFly = new SmsFly(); $smsFly->setLogin('login'); $smsFly->setPassword('password'); $smsFly->setFrom('InfoCentr'); // Alpha name
Sending SMS
$smsFly->setTo('380989361131'); $smsFly->setMessage('Your message'); $response = $smsFly->sendSMS(); // or $response = $smsFly->sendSMS([ 'to' => '380989361131', 'message' => 'Your message', ]);
Campaign info
$smsFly->setCampaignId('3917349'); $info = $smsFly->getCampaignInfo(); // or $info = $smsFly->getCampaignInfo('3917349');
Campaign detail
$smsFly->setCampaignId('3917349'); $detail = $smsFly->getCampaignDetail(); // or $detail = $smsFly->getCampaignDetail('3917349');
Get message status
$smsFly->setTo('380989361131'); $smsFly->setCampaignId('3917349'); $messageStatus = $smsFly->getMessageStatus(); // or $messageStatus = $smsFly->getMessageStatus('380989361131', '3917349');
Get balance
$balance = $smsFly->getBalance(); // 0.01
Add alfa name
$alfaname = $smsFly->addAlfaname('SMS');
Check alfa name
$alfaname = $smsFly->checkAlfaname('SMS');
Alfa names list
$alfanamesList = $smsFly->getAlfanamesList();
License
The SMS Fly API is open-sourced software licensed under the MIT license