![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MQTT
恶魔楚轩
各位观众姥爷们,欢迎点赞和评论指正哦
展开
-
thinkphp集成mqtt订阅
网上找的mqtt类:https://github.com/bluerhinos/phpMQTT/blob/master/phpMQTT.php用的thinkphp5.0,下载后放入extend文件夹下。新建控制器 application/lora/controller/SubController.php<?phpnamespace app\lora\controller;use...原创 2019-10-18 16:09:04 · 3116 阅读 · 1 评论 -
利用phpMQTT实现数据发布
1. github地址:https://github.com/bluerhinos/phpMQTT2.安装:composer require bluerhinos/phpmqtt=@dev3.上代码<?phpnamespace Helper;use Bluerhinos\phpMQTT;class Helper{ /** * mqtt发布消息 */ public static function publish($msg) {原创 2020-05-19 14:31:19 · 1899 阅读 · 0 评论 -
mosquitto的安装与使用
wget https://mosquitto.org/files/source/mosquitto-1.6.8.tar.gz tar xzvf mosquitto-1.6.8.tar.gz cd mosquitto-1.6.8/ make(报错,需安装 yum install openssl-devel) make install ln -s /usr/local/lib/libmos...原创 2020-01-17 14:10:16 · 323 阅读 · 0 评论 -
thinkphp5+workerman集成workerman/mqtt爬坑笔记
1. thinkphp5.0安装workerman composer require topthink/think-worker=1.0.*(tp5.0安装workerman时要指定版本号,不然会报错)2. 安装workerman/mqttcomposer require workerman/mqtt按照官方文档http://doc3.workerman.net/69663...原创 2020-01-06 15:51:09 · 3295 阅读 · 1 评论