PHP code example of wablas / wablas-client-php

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

    

wablas / wablas-client-php example snippets


composer 

use Wablas\WablasClient;

$apiToken = 'your-api-token-here';
$wablasClient = new WablasClient($apiToken);

// add recipient (support multiple recipient)
$wablasClient->addRecipient('08xxxxxxxxx');

// send message
$message = 'type your message here.';
$wablasClient->sendMessage($message);

// send image
$wablasClient->sendImage('your image caption here', 'http://your.image/url/here')