Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kudinovfedor/sms-fly
SMS FLY API (XML)
https://github.com/kudinovfedor/sms-fly
api php sms sms-fly sms-fly-api xml
Last synced: 27 days ago
JSON representation
SMS FLY API (XML)
- Host: GitHub
- URL: https://github.com/kudinovfedor/sms-fly
- Owner: kudinovfedor
- License: mit
- Created: 2020-08-07T21:37:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-17T15:21:51.000Z (over 2 years ago)
- Last Synced: 2024-11-24T17:02:07.629Z (30 days ago)
- Topics: api, php, sms, sms-fly, sms-fly-api, xml
- Language: PHP
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# SMS Fly (XML)
## Installation
Require this package with [composer](https://getcomposer.org) using the following command:
```bash
composer require kudinovfedor/sms-fly
```## Usage
```php
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
```php
$smsFly->setTo('380989361131');
$smsFly->setMessage('Your message');$response = $smsFly->sendSMS();
// or
$response = $smsFly->sendSMS([
'to' => '380989361131',
'message' => 'Your message',
]);
```#### Campaign info
```php
$smsFly->setCampaignId('3917349');
$info = $smsFly->getCampaignInfo();// or
$info = $smsFly->getCampaignInfo('3917349');
```#### Campaign detail
```php
$smsFly->setCampaignId('3917349');
$detail = $smsFly->getCampaignDetail();// or
$detail = $smsFly->getCampaignDetail('3917349');
```#### Get message status
```php
$smsFly->setTo('380989361131');
$smsFly->setCampaignId('3917349');
$messageStatus = $smsFly->getMessageStatus();// or
$messageStatus = $smsFly->getMessageStatus('380989361131', '3917349');
```#### Get balance
```php
$balance = $smsFly->getBalance(); // 0.01
```#### Add alfa name
```php
$alfaname = $smsFly->addAlfaname('SMS');
```#### Check alfa name
```php
$alfaname = $smsFly->checkAlfaname('SMS');
```#### Alfa names list
```php
$alfanamesList = $smsFly->getAlfanamesList();
```##### License
The SMS Fly API is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT)