PHP code example of hipchat / hipchat-php
1. Go to this page and download the library: Download hipchat/hipchat-php 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/ */
hipchat / hipchat-php example snippets
$token = '<your api token>';
$hc = new HipChat\HipChat($token);
// list rooms
foreach ($hc->get_rooms() as $room) {
echo " - $room->room_id = $room->name\n";
}
// send a message to the 'Development' room from 'API'
$hc->message_room('Development', 'API', 'This is just a test message!');