PHP code example of websvc / php-rocketchat-webhooks
1. Go to this page and download the library: Download websvc/php-rocketchat-webhooks 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/ */
websvc / php-rocketchat-webhooks example snippets
$client = new \PhpRocketChatWebhooks\Client('https://rocket.chat/hooks/TOKEN', "Optional-Username");
$client->sendRequest("Hello World!");
$client = new \PhpRocketChatWebhooks\Client('https://rocket.chat/hooks/TOKEN', "Optional-Username");
$client->sendRequest("Hello World!", [
'title' => "Google homepage",
'title_link' => "https://google.com",
'text' => "text text text text text text text",
'image_url' => "https://www.google.pt/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
]);
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.