PHP code example of nasution / zenziva

1. Go to this page and download the library: Download nasution/zenziva 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/ */

    

nasution / zenziva example snippets


// Regular

on\Zenziva\Zenziva;

$zenziva = new Zenziva('userkey', 'passkey');

// SMS
$zenziva->sms('0812223333', 'Halo');

// WhatsApp
$zenziva->wa('6285551111', 'Halo');

// Voice message
$zenziva->voice('0812223333', 'Halo');

// SMS Masking
$zenziva = new Zenziva('userkey', 'passkey', [
    'masking' => true,
]);

$zenziva->sms('0812223333', 'Halo');

// Zenziva Sms Center
$zenziva = new Zenziva('userkey', 'passkey', [
    'domain' => 'domain_name.com',
]);

$zenziva->sms('0812223333', 'Halo');

// Zenziva WhatsApp Center
$zenziva = new Zenziva('userkey', 'passkey', [
    'domain' => 'domain_name.com',
    'whatsapp_id' => 'whatsapp_id',
]);

$zenziva->wa('6285551111', 'Halo');