xiaklizrum / smspilot-client
SMSPilot API 客户端
dev-master
2019-07-01 01:47 UTC
Requires
- php: ^5.4 || ^7.0
- ext-json: *
This package is auto-updated.
Last update: 2024-09-13 15:54:47 UTC
README
安装
composer require xiaklizrum/smspilot-client
用法
示例
<?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)); ?>
输出
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)