Skip to content

Premium-Fast-Network/wsgateway-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PFN PHP Library WSGateway

StyleCI Latest Stable Version Total Downloads License

This library for easy to use in PHP with composer installation. Please referer to our REST API Documentation if you want to build in you're own programing langguage.

Installation

composer require premiumfastnet/wsgateway

How to Use

Example

You can check on folder example for easy to use. keep in mind, you need change config.php.example to config.php and fill variable on that files to work or you can make you're own combination.

Send Message Example

  • Request
<?php

require "vendor/autoload.php";

use PremiumFastNetwork\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));
  • Response
class stdClass#29 (2) {
  public $code =>
  int(200)
  public $message =>
  string(44) "success, message will be send in background."
}

Send Bulk Message Example

  • Request
<?php

require "vendor/autoload.php";

use PremiumFastNetwork\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));
  • Response
class stdClass#29 (2) {
  public $code =>
  int(200)
  public $message =>
  string(37) "success, all message in waiting list."
}

Send Bulk Message to Contact Group

  • Request
<?php

require "vendor/autoload.php";

use PremiumFastNetwork\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));
  • Response
class stdClass#29 (2) {
  public $code =>
  int(200)
  public $message =>
  string(37) "success, all message in waiting list."
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages