Sitepoint has published another Ajax tutorial: Take
Command with AJAX by Stoyan Stefanov is a walkthrough of creating a command-line interface using JavaScript and
PHP. If you're still trying to figure out Ajax, it's worth a read.
I do have to take issue with Stefanov's choice of example, though—a command-line shell that passes user input to a
shell exec on the server. Granted, the PHP script is restricted to allowing only a few set commands, but PHP
has had the occasional security hole, and the first thing many people are going to do while tinkering with
this is to remove the single if statement that handles security. Please be warned, don't implement
anything like this without doing a great deal of thinking about security.






