Require this package with composer using the following command:
composer require kudinovfedor/sms-fly
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
$smsFly->setTo('380989361131');
$smsFly->setMessage('Your message');
$response = $smsFly->sendSMS();
// or
$response = $smsFly->sendSMS([
'to' => '380989361131',
'message' => 'Your message',
]);
$smsFly->setCampaignId('3917349');
$info = $smsFly->getCampaignInfo();
// or
$info = $smsFly->getCampaignInfo('3917349');
$smsFly->setCampaignId('3917349');
$detail = $smsFly->getCampaignDetail();
// or
$detail = $smsFly->getCampaignDetail('3917349');
$smsFly->setTo('380989361131');
$smsFly->setCampaignId('3917349');
$messageStatus = $smsFly->getMessageStatus();
// or
$messageStatus = $smsFly->getMessageStatus('380989361131', '3917349');
$balance = $smsFly->getBalance(); // 0.01
$alfaname = $smsFly->addAlfaname('SMS');
$alfaname = $smsFly->checkAlfaname('SMS');
$alfanamesList = $smsFly->getAlfanamesList();
The SMS Fly API is open-sourced software licensed under the MIT license