Hi,
I'm very new to all of the topics (node red, websockets and php).
I want to use node red for pushing mqtt messages via websocket to my php page and vice versa. I tried some websocket/node red demos and they are all working fine. I now stayed with this demo
https://flows.nodered.org/flow/8666510f94ad422e4765 because I only need a button embedded in my php which sends a message through the websocket.
When I use localhost:1880/simple it's working (obviously).
But I don't know how to embedd this button in my php page. When I just include the /simple url in a php file it doesn't get a connection. When I paste the html code to my php file it's the same. (Opcode -1)
First I thought it can't be that difficult but as I don't know websockets it feels like a kind of a life-task.
The easiest possibility would be a php palette but as far as I could google it there is no available package. Does anyone know how to get such a cross connection between websockets and php pages.
background: I need the php page because I had to do a login, session, mysql queries, ....
Cheers