PHP code example of nutama / mattermost-webhook
1. Go to this page and download the library: Download nutama/mattermost-webhook 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/ */
nutama / mattermost-webhook example snippets
hook_uri = 'http://{your-mattermost-site}/hooks/xxx-generatedkey-xxx';
$client = new \GuzzleHttp\Client(['base_uri' => $webhook_uri]);
$mattermost_webhook = new \Nutama\MattermostWebhook\MattermostWebhook($client);
$message = new \Nutama\MattermostWebhook\Message('message');
$mattermost_webhook->send($message);
bash
php composer.phar