1. Go to this page and download the library: Download roesten/rocketchat 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/ */
roesten / rocketchat example snippets
composer
$message = new Message();
$message->setImportant(false);
$message->setSuccess(false);
#name channel
$message->setChannel('test');
$message->setText(Markdown::table(['Country','City'],['Spain','Madri']));
$clientRocketChat = new RocketChat('https://rocketchat.com.br/api/v1/','UGS45hIeD29u0SYmwAdVmdF7cNbOd0ydg4487S9zgw5','SJSGHJLKlhdds');
$clientRocketChat->sendMessage($message);