Jump to content

MQTT with php and wamp server


mythri

Recommended Posts

I am developing a script in which i will be publishing topics to MQTT server and also when i receive the message , i submit few data to database too. I have copied and the files from MQTT client in E drive as in here , and  i have pasted it in my local root directory www/phpmqtt. but i am not getting how run this subscribe.php under examples folder. I tried running it like this - http://phpmqtt/examples/subscribe.php. It shows data from phpMQTT.php messages, but doent shows what is there in subscribe.php. How to run this? Please somebody suggest me. 

And also where and how do i define topics?  Please help me out

 

Link to comment
Share on other sites

You can't just copy and paste code you find on the internet. You need to understand what the code does and how to adapt it to your environment. As a help forum you need to post your code here (using the code icon (<>) in the top menu specifying PHP or HTML as appropriate) along with any error messages and/or what output you expect that is different from what you actually get. The first place to start is to make sure your httpd is running properly. What files are currently in your DocRoot?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.