PHP code example of textko / php

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

    

textko / php example snippets


 tko = new Textko\Sms('your-access-token-here');

$sms = $textko->send('09171234567', 'My awesome text message');

$sms->smsId(); // Get sms id.
$sms->toNo(); // Get recipient to no.
$sms->text(); // Get sms text.
$sms->status(); // Get sms current status.


 tko = new Textko\Sms('your-access-token-here');

$list = $textko->getList();

$list->data(); // Get list of sms.


 tko = new Textko\Sms('your-access-token-here');

$smsId = 'ABC';
$sms = $textko->get($smsId);

$sms->smsId(); // Get sms id.
$sms->toNo(); // Get recipient to no.
$sms->text(); // Get sms text.
$sms->status(); // Get sms current status.

bash
composer