Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/buibr/mizu-voip-sms-php

Send SMS with Mizu VoIP switch
https://github.com/buibr/mizu-voip-sms-php

Last synced: 23 days ago
JSON representation

Send SMS with Mizu VoIP switch

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
)
```