PHP code example of vdbelt / inmobile-sms-api
1. Go to this page and download the library: Download vdbelt/inmobile-sms-api 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/ */
vdbelt / inmobile-sms-api example snippets
use Inmobile\Text;
use Inmobile\Gateway;
use Inmobile\Message;
use Inmobile\Recipient;
$gateway = Gateway::create('apiKey');
$message = Message::create('Hello world!')->from('My App')->to('4512345678');
$gateway->addMessage($message);
$gateway->send();
// Other capabilities:
$text = (new Text('Hello World'))->flash()->encoding('utf-8');
$recipients = [
(new Recipient('4512345678'))->withMessageId('my-id'),
'450000000'
];
Message::create($text)->to($recipients)->from('My App')->doNotRespectBlacklist()->scheduleAt(date_create('+1 hour'));