PHP code example of markenwerk / slack-client
1. Go to this page and download the library: Download markenwerk/slack-client 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/ */
markenwerk / slack-client example snippets
{php}
{php}
use Markenwerk\SlackClient\SlackClient;
$client = new SlackClient();
$client
->setSubdomainName('markenwerk')
->setToken('<YOUR_API_TOKEN>')
->setUsername('PHP SlackClient');
{php}
$client->postToChannel('#channel', $message);
{php}
$client->postToMember('@member', $message);