PHP code example of igormakarov / alphasms.http.api.client

1. Go to this page and download the library: Download igormakarov/alphasms.http.api.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/ */

    

igormakarov / alphasms.http.api.client example snippets




$client = new AlphaSmsHttpClient('yourApiKey');

$client->getBalance(): float 

$client->getSmsPriceByNumber("+yourNumber"): \igormakarov\AlphaSms\SmsPrice - має інформацію про смс з ціною та валютою

$smsId = $client->sendMessage(new Sms("alphaNameOrPhoneNumber", "to phone", "message text")): int - id смс

$client->getMessageStatus($smsId): \igormakarov\AlphaSms\Message\MessageStatus - має інформацію про статус повідомлення код, та дату
cli
composer