1. Go to this page and download the library: Download ay4t/php-watzap-id 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/ */
ay4t / php-watzap-id example snippets
use Dotenv\Dotenv;
use Ay4t\WatzapId\Config\WatzapConfig;
use Ay4t\WatzapId\WatzapClient;
// Load environment variables
$dotenv = Dotenv::createImmutable(__DIR__);
$dotenv->load();
// Inisialisasi konfigurasi
$config = new WatzapConfig();
$config->setApiKey($_ENV['API_KEY'])
->setNumberKey($_ENV['NUMBER_KEY']);
// Buat instance WatzapClient
$watzap = new WatzapClient($config);