"PHP" / Говнокод #21277 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
<?php
	$command = "yowsup-cli demos --yowsup --login 8618658750496:D/vuECtIPpaalf/bz4HIrLBLISI=";
	$descriptorspec = array(
		0 => array("pipe", "r"),
		1 => array("pipe", "w"),
		2 => array("pipe", "r")
	);
	$process = proc_open($command, $descriptorspec, $pipes, null, null); //run test_gen.php
	echo ("Start process:\n");
	if (is_resource($process))
	{
		fwrite($pipes[0], "/help\n");    // send start
		echo ("\n\nStart ....".fgets($pipes[1],4096)); //get answer
		fwrite($pipes[0], "/exit\n");    // send get
		echo ("Get: ".fgets($pipes[1],4096));    //get answer

		fclose($pipes[0]);
		fclose($pipes[1]);
		fclose($pipes[2]);
		$return_value = proc_close($process);  //stop test_gen.php
		echo ("Returned:".$return_value."\n");
	}

Запостил: vityapro vityapro, (Updated )

Комментарии (0) RSS

Добавить комментарий

Переведи на "PHP", guest!

    А не использовать ли нам bbcode?


    8