PHP code example of mathieuimbert / slack-logger
1. Go to this page and download the library: Download mathieuimbert/slack-logger 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/ */
mathieuimbert / slack-logger example snippets
$logger = new \MathieuImbert\Slack\Logger\SlackLogger('https://hooks.slack.com/services/xxxxxxx/xxxxxxx/xxxxxxx');
$logger->warning('This a not test of the emergency broadcast system, this is the real thing');
$logger = new \MathieuImbert\SlackLogger\SlackLogger(
'https://hooks.slack.com/services/xxxxxxx/xxxxxxx/xxxxxxx',
array('username' => 'My Slack Logger', 'icon_emoji' => ':cop:')
);