PHP code example of buibr / mizu-voip-sms-php

1. Go to this page and download the library: Download buibr/mizu-voip-sms-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

buibr / mizu-voip-sms-php example snippets


$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();


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();


buibr\Mizu\mizuResponse Object
(
    [code] => 200
    [type] => text/plain
    [time] => 0.417484
    [status] => 1
    [response] => $9.8
    [data] => Your credit is $9.8
)

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
)
terminal
composer requre buibr/budget-sms-php