PHP code example of dartui / multiinfo

1. Go to this page and download the library: Download dartui/multiinfo 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/ */

    

dartui / multiinfo example snippets


'providers' => [
    ...
    Dartui\Multiinfo\ServiceProvider::class,
];

'url'        => 'https://api1.multiinfo.plus.pl', // API base URL

'login'      => null, // API user login
'password'   => null, // API user password
'service_id' => null, // API user service id

'cert'       => [
    'is_nss'   => false, // Whether cURL is using NSS or no
    'nicename' => null,  // Nicename of certificate (

$response->getCode();        // status code
$response->getDescription(); // response in text format

$response->hasError();
$response->getError();

$multiinfo = app('multiinfo');

$sendSms = $multiinfo->request('sendSms')
    ->setDestination('48123456789') // 

$sendSms->getMessageId(); // sent SMS id

$multiinfo = app('multiinfo');

$getSms = $multiinfo->request('getSms')
    ->setManualConfirmation(true) // optional, default false
    ->setDeleteContent(true)      // optional, default false
    ->setTimeout(5000)            // optional
    ->send();

$getSms->getMessageId();   // received SMS id
$getSms->getSender();      // sender phone number
$getSms->getReceiver();    // receiver phone number
$getSms->getMessageType(); // message type id
$getSms->getMessage();     // message content
$getSms->getProtocol();    // protocol id
$getSms->getEncoding();    // encoding id
$getSms->getServiceId();   // service id
$getSms->getConnector();   // connector id
$getSms->getReceiveDate(); // received date

$multiinfo = app('multiinfo');

$confirmSms = $multiinfo->request('confirmSms')
    ->setMessageId(123456)   // 

$multiinfo = app('multiinfo');

$package = $multiinfo->request('package')
    ->setMessage('Hello world!')  // default message
    ->setOrigin('New Origin')     // optional
    ->addDestination('123456789')
    ->addDestination('234567890') // to this numbers will be send default message
    ->addDestination('987654321', 'Hello another world!') // personalized message
    ->send();

$package->getPackageId(); // sent package id
sh
php artisan vendor:publish --provider=Dartui\\Multiinfo\\ServiceProvider