Node.js: Execute command on Web Page button click

How can I execute a linux shell command on webpage button click or keyboard keypress with NodeJs and PHP?

Thanks

I did not understand well. Do you want to click on a button and that nodejs executes a command? If yes, this is the nodejs part

var sys = require('sys')
var exec = require('child_process').exec;
function puts(error, stdout, stderr) { sys.puts(stdout) }
exec("ls", puts); // Command

on the button you'll assign an ajax call onclick that makes a request to nodejs.

Source: http://www.dzone.com/snippets/execute-unix-command-nodejs

Run Bash Script with Node from client request

works for me, and do not need PHP, just Javascript/jQuery on client and Node.js on server.