To embed the cli tool into your web application you need to
* perform the execution of the binary with referencing the ini `<PATH>amcli --ini=<INI-FILE>`
* catch exitcode and output of STDOUT
* check returncode:
* if it is `0` then the excution was successful - we have a result. You can send the JSON after setting the content type as http response header
* if it is `> 0` the response is no JSON syntax. You should send the output that the error is seen in the appm nitor server.
## PHP
This code snippet is for demonstration purposes only. A PHP web app should use the PHP client - see <https://os-docs.iml.unibe.ch/appmonitor/PHP_client/index.html>