Unix style terminal web app using php and ajax