1. Go to this page and download the library: Download iamirnet/samantel 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/ */
iamirnet / samantel example snippets
// config by specifying api key and secret
$api = new \iAmirNet\SamanTel\SamanTelSOAP("username","password");
//Call this before running any functions
print_r($api->balance());
//Call this before running any functions
print_r($api->send(/*Sender Number*/"989999xxxx", /*Receive Number*/"989xxxxxxxxxx",/*Text Message*/ "متن پیامک", /* Flash */ 1));
//Call this before running any functions
print_r($api->sendMultiple(/*Senders Number*/["989999xxxx"], /*Receives Number*/["989xxxxxxxxxx"],/*Text Messages*/ ["متن پیامک"], /* Flash */ [1], , /* Custom Ids */ [140210111]));
//Call this before running any functions
print_r($api->deliveryReport(/*Sender Number*/"989999xxxx", /*Message ID*/48222256, /*from ID Or Null*/'48222254', ));
//Call this before running any functions
print_r($api->viewReceive(/*Number*/"989999xxxx", /*Message ID Or Null*/48222256));
//Call this before running any functions
print_r($api->getStatuses(/* Custom Ids */ [140210111]));
//Call this before running any functions
print_r($api->getStatuses_OriginalID(/* Custom Ids */ [140210111]));
//Call this before running any functions
print_r($api->acknowledge(/* Custom Ids */ [140210111]));