= 4.3.0 $newstring = ''; $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w") ); $process = proc_open($program . ' ' . $poptions, $descriptorspec, $pipes = array()); if (is_resource($process)) { fwrite($pipes[0], $buffer); fclose($pipes[0]); while (!feof($pipes[1])) { $newstring .= fgets($pipes[1], 1024); } fclose($pipes[1]); // we don't currently use the return value $return_value = proc_close($process); } if ($options[2] == 1 || $options[2] == '2') { $retstring = htmlspecialchars($newstring); } else { $retstring = $newstring; } return $retstring; } ?>