PHP code example of alhoqbani / mobily.ws

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

    

alhoqbani / mobily.ws example snippets


php artisan vendor:publish --provider='Alhoqbani\MobilyWs\MobilyWsServiceProvider'

use Alhoqbani\MobilyWs\SMS;


   $sms = new SMS();
   
    $sms->text('This is an SMS from Mobily.ws')
        ->to('9665xxxxxxxx')
        ->send();
        
    echo $sms->result(); // تمت عملية الإرسال بنجاح
    
    echo $sms->balance(); // 1124

    $sms->text('This is an SMS from Mobily.ws')
        ->to('9665xxxxxxxx')
        ->when('10/25/2030', 06:30:00') 
        ->send();