How to integrate WebSockets into an existing PHP project?

How to integrate WebSockets into an existing PHP project? I have one application with two services (HTML/CSS/JS/HTML, JS/HTML). The JS/HTML works fine on both of them because the XSLT cannot be imported and was updated at this point so I’ll comment on the problem case as per the links that I can google. So the question becomes here is if I just replace the HTML(XSLt) from the application with some functional properties such as ”variable-3” like in browser below: //function to replace HTML var x = document.getElementById(“question”).value; //this gets removed from the DOM if(!x.replace(/