PHP code example of rikkicom / call2fa
1. Go to this page and download the library: Download rikkicom/call2fa 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/ */
rikkicom / call2fa example snippets
use Rikkicom\Call2FA\Client;
use Rikkicom\Call2FA\ClientException;
or this call
$callTo = '+380631010121';
$callbackURL = 'http://example.com';
try {
// Create the Call2FA client
$client = new Client($login, $password);
// Make a call
$client->call($callTo, $callbackURL);
echo "Wait the call!";
} catch (ClientException $e) {
// Something went wrong, we recommend to log the error
echo "Error:";
echo "\n";
echo $e;
}