- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
<?php
$command = "yowsup-cli demos --yowsup --login 8618658750496:D/vuECtIPpaalf/bz4HIrLBLISI=";
$descr = array(
0 => array(
'pipe',
'r'
) ,
1 => array(
'pipe',
'w'
) ,
2 => array(
'pipe',
'w'
)
);
$pipes = array();
$process = proc_open($command, $descr, $pipes);
if (is_resource($process)) {
fputs($pipes[0], "/help");
fclose($pipes[0]);
while ($f = fgets($pipes[1])) {
echo "-pipe 1--->";
echo $f;
}
fclose($pipes[1]);
while ($f = fgets($pipes[2])) {
echo "-pipe 2--->";
echo $f;
}
fclose($pipes[2]);
proc_close($process);
}
barop 08.10.2016 05:17 # 0
хих)http://www.demos.su/