rendered paste bodyClient: yourscript.php
<?php
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "w"),
3 => array("pipe", "r")
);
$process = proc_open('myscript.php', $descriptorspec, $pipes);
if(is_resource($process)) {
fwrite($pipes[0], 'This is stdin');
fwrite($pipes[3], 'This is the audio stream');
fclose($pipes[0]);
fclose($pipes[1]);
fclose($pipes[2]);
fclose($pipes[3]);
$return_value = proc_close($process);
}
?>
Server: myscript.php
#!/usr/local/bin/php -q
<?php
$stdin = fopen("php://stdin", 'r');
$audo = fopen(????, 'r');
echo fgets($stdion, 4096) . "\n";
echo fgets($audio, 4096) . "\n";
fclose($stdin);
fclose($audio);
?>
?>