1. Go to this page and download the library: Download erdemkeren/jet-sms-php 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/ */
erdemkeren / jet-sms-php example snippets
use Erdemkeren\JetSms\JetSmsService;
use Erdemkeren\JetSms\JetSmsService;
use Erdemkeren\JetSms\ShortMessageFactory;
use Erdemkeren\JetSms\Http\Clients\JetSmsXmlClient;
use Erdemkeren\JetSms\Http\Clients\JetSmsHttpClient;
use Erdemkeren\JetSms\ShortMessageCollectionFactory;
$service = new JetSmsService(new JetSmsXmlClient(
'www.biotekno.biz:8080/SMS-Web/xmlsms',
'username',
'password',
'outboxname'
), new ShortMessageFactory(), new ShortMessageCollectionFactory());
// ya da
$service = new JetSmsService(new JetSmsHttpClient(
new GuzzleHttp\Client(),
'https://service.jetsms.com.tr/SMS-Web/HttpSmsSend',
'username',
'password',
'outboxname'
), new ShortMessageFactory(), new ShortMessageCollectionFactory());
$response = $service->sendShortMessage(['5530000000', '5420000000'], 'This is a test message.');
if($response->isSuccessful()) {
// storeGroupIdForLaterReference is not );
}
$response2 = $service->sendShortMessages([[
'recipient' => '5530000000',
'message' => 'This is a test.',
], [
'recipient' => '5420000000',
'message' => 'This is another test.',
]]);
if($response2->isSuccessful()) {
// storeGroupIdForLaterReference is not
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.