1. Go to this page and download the library: Download elfsundae/bearychat 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/ */
elfsundae / bearychat example snippets
(new Client('https://hook.bearychat.com/=...'))
->text('content')
->add('attachment', 'title')
->addImage($imageUrl, 'image description')
->sendTo('admin');
(new Client($webhook))->send('content', 'attachment');
$client = new ElfSundae\BearyChat\Client('http://hook.bearychat.com/=.../incoming/...');
use ElfSundae\BearyChat\Client;
$client = new Client($webhook, [
'channel' => 'server-log',
'attachment_color' => '#3e4787'
]);
$client = new Client($webhook, [
'channel' => 'all'
]);
// Sending a message to the default channel
$client->send('Hi there :smile:');
// Sending a customized message
$client->send('disable **markdown**', false, 'custom notification');
// Sending a message with one attachment added
$client->send('message title', 'Attachment Content');
// Sending a message with an customized attachment
$client->send(
'message with an customized attachment',
'Attachment Content',
'Attachment Title',
$imageUrl,
'#f00'
);
// Sending a message with multiple images
$client->send('multiple images', null, null, [$imageUrl1, $imageUrl2]);
// Sending a message to a different channel
$client->sendTo('iOS', '**Lunch Time !!!**');
// Sending a message to an user
$client->sendTo('@elf', 'Where are you?');
$client->webhook($webhook_ios)->setMessageDefaults([
'channel' => 'ios_dev'
])->send('App reviewing status has updated.');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.