PHP code example of xoxzo / cloudphp

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

    

xoxzo / cloudphp example snippets


use xoxzo\cloudphp\XoxzoClient;

$sid = <Your Xoxzo SID>;
$auth_token = <Your Xoxzo AUTH TOKEN>
$recipient = '+818012345678';
$sender = '818012345678';
$message = 'Hello form Xoxzo PHP lib';

$xc = new XoxzoClient($sid,$auth_token);
$resp = $xc->send_sms($message, $recipient,$sender);
if ($resp->errors != null){
  print "Error status: $resp->errors\n";
  return;
}

$msgid = $resp->messages[0]->msgid;
$resp = $xc->get_sms_delivery_status($msgid);
var_dump($resp);


$resp = $xc->get_din_list();
$a_din_uid = $resp->messages[0]->din_uid;
$resp = $xc->subscribe_din($a_din_uid);

$resp = $this->xc->get_subscription_list();

$resp = $this->xc->unsubscribe_din($a_din_uid);