1. Go to this page and download the library: Download sms77/monolog 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/ */
sms77 / monolog example snippets
use Seven\Monolog\Config;
use Seven\Monolog\Handler;
use Monolog\Logger;
$logger = Logger('demo');
$apiKey = getenv('SEVEN_API_KEY'); // seven API key eign ID max 64 chars consisting of a-zA-Z0-9, ._@
Config::KEY_FROM => 'Monolog', // optional sender - max 11 alphanumeric or 16 numeric characters
Config::KEY_JSON => 0, // 0 or 1
Config::KEY_LABEL => 'MyLabel', // optional label max 100 chars consisting of a-zA-Z0-9, ._@
Config::KEY_NO_RELOAD => 0, // 0 or 1
Config::KEY_PERFORMANCE_TRACKING => 0, // 0 or 1
Config::KEY_TO => '+491234567890', // recipient(s) separated by comma
];
$handler = Handler::buildFromArray($cfg);
$logger
->pushHandler($handler)
->addCritical('critical bug');
// text-to-speech call
$cfg = [
Config::KEY_API_KEY => $apiKey,
Config::KEY_APP => Config::APP_VOICE,
Config::KEY_FROM => '+4901234567890', // optional sender - must be verified or a shared inbound number
Config::KEY_JSON => 0, // 0 or 1
Config::KEY_TO => '+491234567890', // recipient(s) separated by comma
];
$handler = Handler::buildFromArray($cfg);
$logger
->pushHandler($handler)
->addCritical('critical bug');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.