PHP code example of mahdimajidzadeh / kavenegar
1. Go to this page and download the library: Download mahdimajidzadeh/kavenegar 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/ */
mahdimajidzadeh / kavenegar example snippets
bash
$ php artisan vendor:publish --provider="MahdiMajidzadeh\kavenegar\KavenegarServiceProvider"
php
$sms = new KavenegarSMS();
$result = $sms->send($receptor, $message);
$sms->status; // like 200
$sms->message; // like "تایید شد"
php
$sms = new KavenegarSMS();
$sms->send(...);
$sms->sendArray(...);
$sms->status(...);
$sms->statusLocalMessageid(...);
$sms->select(...);
$sms->selectOutbox(...);
$sms->latestOutbox(...);
$sms->countOutbox(...);
$sms->cancel(...);
$sms->countInbox(...);
$sms->receive(...);
$sms->countPostalcode(...);
$sms->sendByPostalcode(...);
$verify = new KavenegarVerify();
$verify->lookup(...);