PHP code example of coderatio / smartsms
1. Go to this page and download the library: Download coderatio/smartsms 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/ */
coderatio / smartsms example snippets
use Coderatio\Smartsms\Smartsms;
$config['token'] = env('SMARTSMS_TOKEN');
// Or
$config['token'] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$sms = Smartsms::init($config)
->to('XXX-XX-XXXX-XXXX')
->from('Coderatio')
->message('I have installed the library.')
->send();
$sms->asObject(); //Returns response as object
$sms->response(); //Returns as json.