PHP code example of volkanmetin / smsapi
1. Go to this page and download the library: Download volkanmetin/smsapi 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/ */
volkanmetin / smsapi example snippets
'Volkanmetin\Smsapi\SmsapiServiceProvider',
'Smsapi' => 'Volkanmetin\Smsapi\Facades\Smsapi',
$send = Smsapi::send('05355469076', 'Merhaba');
echo $send->last_message;
$send = Smsapi::send('05355469076', 'Merhaba');
if($send) {
echo 'SMS başarı ile gönderildi!';
} else {
echo $send->last_message;
}
$kisiler = array('00905355469076', '+905355469076', '05355469076', '5355469076');
$send = Smsapi::send($kisiler, 'Merhaba');
echo $send->last_message;
$send = Smsapi::send('00905355469076', '+905355469076', '05355469076', '5355469076', 'Merhaba');
echo $send->last_message;
echo Smsapi::getCredit();
$originators = Smsapi::getOriginators();
dd($originators);
echo Smsapi::send('05355469076', 'Geç gidecek mesaj', '2099-06-30 15:00'); //saniye yok, dikkat!
echo Smsapi::send('05355469076', 'merhaba', '', 'diğerOriginator');
shell
php artisan vendor:publish