1. Go to this page and download the library: Download smsapi/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/ */
smsapi / php-client example snippets
declare(strict_types=1);
use Smsapi\Client\Curl\SmsapiHttpClient;
declare(strict_types=1);
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\RequestFactoryInterface;
use Psr\Http\Message\StreamFactoryInterface;
use Smsapi\Client\SmsapiHttpClient;
sapiHttpClient($httpClient, $requestFactory, $streamFactory);
declare(strict_types=1);
use Smsapi\Client\SmsapiClient;
$apiToken = '0000000000000000000000000000000000000000';
$service = $client->smsapiComService($apiToken);
declare(strict_types=1);
use Smsapi\Client\SmsapiClient;
$apiToken = '0000000000000000000000000000000000000000';
$service = $client->smsapiPlService($apiToken);
declare(strict_types=1);
use Smsapi\Client\Service\SmsapiComService;
/** @var SmsapiComService $service */
ho 'Not authorized';
}
declare(strict_types=1);
use Smsapi\Client\Service\SmsapiComService;
use Smsapi\Client\Feature\Sms\Bag\SendSmsBag;
/** @var SmsapiComService $service */
declare(strict_types=1);
use Smsapi\Client\Service\SmsapiComService;
use Smsapi\Client\Feature\Sms\Bag\SendSmsBag;
/** @var SmsapiComService $service */
declare(strict_types=1);
use Psr\Log\LoggerInterface;
use Psr\Log\LoggerTrait;
use Smsapi\Client\SmsapiClient;
use LoggerTrait;
public function log($level, $message, array $context = [])
{
var_dump($level, $message, $context);
}
};
$client->setLogger($logger);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.