PHP code example of wilddog / sms

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

    

wilddog / sms example snippets




use wilddog\sms\Settings;
use wilddog\sms\Sms;

$settings = new Settings('<YOUR_APP_ID>', '<YOUR_SMS_KEY>');
$sms = new Sms($settings);

$response = $sms->sendCode('<PHONE_NUMBER>', '<YOUR_TEMPLATE_ID>', $settings);
echo $response->__toString();

$response = $sms->sendCode('<PHONE_NUMBER>', '<YOUR_TEMPLATE_ID>', $settings, array('Var1', 'Var2'));
echo $response->__toString();

$response = $sms->checkCode('<PHONE_NUMBER>', '<CODE>');
echo $response->__toString();

$response = $sms->sendNotify(array('<PHONE_NUMBER>'), '<YOUR_TEMPLATE_ID>', array('Var1', 'Var2'));
echo $response->__toString();

$response = $sms->checkStatus('<RRID>');
echo $response->__toString();

$response = $sms->getBalance();
echo $response->__toString();