PHP code example of evp / gsms-php-client

1. Go to this page and download the library: Download evp/gsms-php-client 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/ */

    

evp / gsms-php-client example snippets


    Evp_Gsms_Autoloader::register();

$response = $client->send('Your telephone number', 'Receiver telephone number', 'message');

    if ($response->isSuccessful()) {
           // Do something when the sms has been sent
       } else {
           // Do something when the sms has not been sent
           $lastResponse = $client->getLastResponse();
       }

  try {
    # This is where you send your message
  } catch (Evp_Gsms_Exception $e) {
      $e->getMessage();
      $client->getLastResponse();
  }