<?php require '../src/Osms.php'; use Osms\Osms; $config = array('token' => 'your_access_token'); $osms = new Osms($config); //$osms->setVerifyPeerSSL(false); $response = $osms->getAdminStats(array('country' => 'CIV')); // $response = $osms->getAdminStats(); // $response = $osms->getAdminStats(array('appid' => 'your_app_id')); // $response = $osms->getAdminStats(array('country' => 'CIV', 'appid' => 'your_app_id')); if (empty($response['error'])) { var_export($response); } else { echo $response['error']; }
<?php require '../src/Osms.php'; use Osms\Osms; $config = array('token' => 'your_access_token'); $osms = new Osms($config); //$osms->setVerifyPeerSSL(false); $response = $osms->sendSms('tel:+22500000000', 'tel:+22500000000', 'Hello World!'); if (empty($response['error'])) { echo 'Done!'; } else { echo $response['error']; }
<?php require '../src/Osms.php'; use Osms\Osms; $config = array('token' => 'your_access_token'); $osms = new Osms($config); //$osms->setVerifyPeerSSL(false); $response = $osms->getAdminPurchasedBundles(); //$response = $osms->getAdminPurchasedBundles('CIV'); if (empty($response['error'])) { $purchaseOrders = $response['purchaseOrders']; foreach ($purchaseOrders as $purchaseOrder) { echo $purchaseOrder['bundleDescription'] . ' '; echo $purchaseOrder['orderExecutioninformation']['amount'] . ' ' . $purchaseOrder['orderExecutioninformation']['currency']; } } else { echo $response['error']; }
<?php require '../src/Osms.php'; use Osms\Osms; $config = array('token' => 'your_access_token'); $osms = new Osms($config); //$osms->setVerifyPeerSSL(false); $response = $osms->getAdminContracts('CIV'); // $response = $osms->getAdminContracts(); if (empty($response['error'])) { var_export($response); } else { echo $response['error']; }
<?php require '../src/Osms.php'; use Osms\Osms; $config = array('clientId' => 'your_client_id', 'clientSecret' => 'your_client_secret'); $osms = new Osms($config); //$osms->setVerifyPeerSSL(false); $response = $osms->getTokenFromConsumerKey(); if (empty($response['error'])) { echo $response['access_token']; // echo $osms->getToken(); } else { echo $response['error']; }