buibr/mizu-voip-sms-php

There is no license information available for the latest version (v2.0.2) of this package.

Send SMS with Mizu VoIP switch

v2.0.2 2019-06-20 12:34 UTC

This package is auto-updated.

Last update: 2024-04-20 23:32:57 UTC


README

Install with composer

composer requre buibr/budget-sms-php

Usage:

Example 1:

$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:

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:

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

Error:

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
)