Get method use for all request.
For example:
-
- Download the favorite node version from this site http://nodejs.org/dist/
- Extract the node-vxx.yy.zz.tar.gz on your php host and change the name "node"
- Upload your node application to your host.
- and use to below instruction
GET example.com/index.php?server=node/bin/node&app=mqtt/index.js
- result:
{
"pid": "2199255",
"output": "starting mqtt application",
}
GET example.com/index.php?listpid
- result:
{
"pids": [
"2199255 : node/bin/node mqtt/index.js >log/log1349610073.txt 2>&1 & echo $!" ]
}
GET example.com/index.php?kill=2199255
- result:
{
"pid": "2199255",
"output": null
}