PHP code example of supreme / usmsgh-api-sdk

1. Go to this page and download the library: Download supreme/usmsgh-api-sdk 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/ */

    

supreme / usmsgh-api-sdk example snippets



use Urhitec\Usms;


use use Urhitec\Usms;;

$client = new Urhitec\Usms;

$api_key = "Enter Your API Key here";

$url = "https://webapp.usmsgh.com/api/sms/send";

$recipients = "233500000000,233540000000";
$message = "Hello world";
$senderid = "Enter your approved sender ID here";

$response = $client->sendSMS($url, $api_key, $senderid, $recipients, $message);

$api_key = "Enter Your API Key here";

$url = "https://webapp.usmsgh.com/api/balance";

$get_credit_balance = $client->check_balance($url, $api_key);

$api_key = "Enter Your API Key here";

$url = "https://webapp.usmsgh.com/api/me";

$get_profile = $client->profile($url, $api_key);