https://github.com/buibr/mizu-voip-sms-php
Send SMS with Mizu VoIP switch
https://github.com/buibr/mizu-voip-sms-php
Last synced: about 1 year ago
JSON representation
Send SMS with Mizu VoIP switch
- Host: GitHub
- URL: https://github.com/buibr/mizu-voip-sms-php
- Owner: buibr
- Created: 2019-04-02T08:59:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-20T12:36:18.000Z (about 7 years ago)
- Last Synced: 2025-02-09T12:28:50.467Z (over 1 year ago)
- Language: PHP
- Size: 58.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mizu-voip-sms-php
Install with composer
```terminal
composer requre buibr/budget-sms-php
```
Usage:
Example 1:
```php
$mizu = new \buibr\Mizu\mizuSMS( [
'server' => 'the sip server of yours',
'authKey'=> 'xxx',
'authId'=>'xxx',
'authpwd'=>'xxx',
]);
// sender name
$mizu->setSender("Test"); // sender name
// add recepient
$mizu->setRecipient('+38971xxxxxx');
// add message
$mizu->setMessage('Testing the provider');
// Send the message
$send = $mizu->send();
```
Example 2:
```php
use buibr\Mizu\mizuSMS;
$mizu = new mizuSMS( [
'server' => 'the sip server of yours',
'anum'=>'xxx', // sender name
'authKey'=> 'xxx',
'authId'=>'xxx',
'authpwd'=>'xxx',
]);
$credit = $mizu->balance();
```
Response:
Success:
```php
buibr\Mizu\mizuResponse Object
(
[code] => 200
[type] => text/plain
[time] => 0.417484
[status] => 1
[response] => $9.8
[data] => Your credit is $9.8
)
```
Error:
```php
buibr\Mizu\mizuResponse Object
(
[code] => 200
[type] => text/plain
[time] => 0.454436
[status] =>
[response] => auth failed: wrong key xxx NORETRY
[data] => ERROR: auth failed: wrong key xxx NORETRY
)
```