System Commands in Web App

How would I go about calling system commands in a web app? Does anyone have any source available that I can look at?

Thanks!