PHP code example of simps / mqtt-cli
1. Go to this page and download the library: Download simps/mqtt-cli 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/ */
simps / mqtt-cli example snippets
// config.php
return [
'open_mqtt_protocol' => true,
'package_max_length' => 2 * 1024 * 1024,
];
// properties.php
return [
'publish' => [
'topic_alias' => 1,
'message_expiry_interval' => 12,
],
'will' => [
'will_delay_interval' => 60,
'message_expiry_interval' => 60,
],
];