Skip to content

kudinovfedor/sms-fly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMS Fly (XML)

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

Releases

No releases published

Packages

No packages published

Languages