PDA

View Full Version : Interacting with the terminal from php?



ltwinner
May 6th, 2012, 10:45 PM
My friend uses an application through the terminal. I'm not sure of the name of it, its some kind of math program. He opens a terminal, types in the command to start the program and then the terminal prompt changes to a prompt for his program and he can enter commands and it will give him back output.

Anyway, he was saying he would like to have an interface to this application on a webpage but he knows very little about web development. So, the way I see it is someone would go to the website, enter some commands in a form and click submit...then the server would start up this terminal program (or already have it running) send the commands to it, get whatever output it gives, and send that back to the user's browser.

So I am wondering can this be done with PHP? Can I interact with some program running in a terminal through PHP?