title: PHP WebGUI to control CLI application
body: <p>So, I've this scenario:</p>
  
  <p>Embedded device running Debian, XAMPP and some CLI applications.</p>
  
  <p>Those CLI applications are interactive, they update the data every second and the user can input commands to the terminal to change their behavior.</p>
  
  <p>How can I build a WebGui in PHP/HTML start/stop/interact/read data from those applications without using a terminal? Should I use proc_open or exec? What's the best way to update the data without creating a CPU-killer loop?</p>
  
  <p>Thank you.</p>