PHP code example of stormcode / smsplanet-php-client
1. Go to this page and download the library: Download stormcode/smsplanet-php-client 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/ */
stormcode / smsplanet-php-client example snippets
$client = new \SMSPLANET\PHP\Client([
'key' => '<KLUCZ API>',
'password' => '<HASŁO DO API>'
]);
// (...)
$client = new \SMSPLANET\PHP\Client(/* init */);
// Wersja podstawowa
$message_id = $client->sendSimpleSMS([
'from' => 'TEST', // Nazwa nadawcy zgodnie z ustawieniami konta
'to' => '48xxxxxxxxx',
'msg' => 'Treść wiadomości'
]);
// Wersja zaawansowana
$message_id = $client->sendSMS([
'from' => 'TEST', // Nazwa nadawcy zgodnie z ustawieniami konta
'to' => '48xxxxxxxxx',
'msg' => 'Treść wiadomości',
'date' => '21-05-2017 10:05:00',
'clear_polish' => 1,
'test' => 1,
]);