PHP code example of seven.io / craft

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

    

seven.io / craft example snippets


use Seven\Craft\Plugin;

$sms = Plugin::getInstance()->getSms();
$sms->params
    ->setTo('+4901234567890')
    ->setText('Your message')
    ->setFrom('YourCompany')
    ->setDelay('2024-12-31 23:59')
    ->setFlash(true)
    ->setLabel('campaign-2024')
    ->setPerformanceTracking(true);

$success = $sms->send();

use Seven\Craft\Plugin;

$voice = Plugin::getInstance()->getVoice();
$voice->params
    ->setTo('+4901234567890')
    ->setText('Hello there')
    ->setFrom('YourCompany')
    ->setXml(false)
    ->setJson(true);

$success = $voice->send();