PHP code example of tlapi / gosms

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

    

tlapi / gosms example snippets


$sms = new \SMS\GoSMS("CLIENT", "SECRET");
$sms->authenticate();
$sms->setChannel(1);
$sms->setMessage('Test');
$sms->setRecipient('+420xxxyyyzzz');
$sms->setExpectedSendTime(new \DateTime('+1 hour', new \DateTimeZone('Europe/Prague')));
$sms->send();