PHP code example of premiumfastnet / wsgateway

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

    

premiumfastnet / wsgateway example snippets




remiumFastNetwork\WSGateway;

$wa = new WSGateway();
$wa->token('YOUR-TOKEN-HERE');
$wa->deviceid('YOUR-DEVICE-ID');
$send = $wa->sendmessage('0812xxxxxxxx', 'test send message by api');
var_dump(json_decode($send));



remiumFastNetwork\WSGateway;

$wa = new WSGateway();
$wa->token('YOUR-TOKEN-HERE');
$wa->deviceid('YOUR-DEVICE-ID');

$multiplenumber = array(
    '08xxxx', '08xxxxx'
);
$send = $wa->sendmessage($multiplenumber, 'test send message by api');
var_dump(json_decode($send));



remiumFastNetwork\WSGateway;

$wa = new WSGateway();
$wa->token('YOUR-TOKEN-HERE');
$wa->deviceid('YOUR-DEVICE-ID');
$send = $wa->sendgroup('xxxxx', 'test send message by api');
var_dump(json_decode($send));