PHP code example of oksweb / sms-api-php

1. Go to this page and download the library: Download oksweb/sms-api-php 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/ */

    

oksweb / sms-api-php example snippets






$OKSWebSMSGateway = new \OKSWeb\SMS\Gateway(
    'mKdG9gjFdmuPWbFAFn9wrAi3bwJ8V6QpNcU7sCQBF9SKtfcSbE8DSgy1Mg2fbjpp', // API Key
    1, // Server ID default to 1
);

$balance = $OKSWebSMSGateway->checkBalance();

$response = $OKSWebSMSGateway->sendQuickSMS(
    '+213512345678', // This is the phone number in the E.164 Format !
    'Hello World !', // Your message
);
bash
composer 
bash
./vendor/bin/php-cs-fixer fix -v .