xiaklizrum / smspilot-client
Client for SMSPilot API
Installs: 1 586
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 1
Requires
- php: ^5.4 || ^7.0
- ext-json: *
This package is auto-updated.
Last update: 2024-05-13 15:08:36 UTC
README
Installation
composer require xiaklizrum/smspilot-client
Usage
Example:
<?php use SMSPilot\Client; use SMSPilot\Request; $apiKey = 'your api key from https://smspilot.ru/my-settings.php'; $client = new Client($apiKey); $request = new Request( 'SENDERNAME', // empty string if u haven't '79991111111', 'Hello world' ); var_dump($client->send($request)); ?>
Output:
array (size=3) 'send' => array (size=4) 'server_id' => string '123456789' (length=9) 'phone' => string '79991111111' (length=11) 'price' => string '2.22' (length=4) 'status' => string '0' (length=1) 'balance' => string '98.88' (length=6) 'cost' => string '2.22' (length=4)