<?php

	$descriptorspec = array(
	   0 => array("pipe", "r"),   // stdin is a pipe that the child will read from
	   1 => array("pipe", "w"),   // stdout is a pipe that the child will write to
	   2 => array("pipe", "w")    // stderr is a pipe that the child will write to
	);

	flush();

	//$cmd = "/var/www/html/M0/OB_silent_start.sh";
	$cmd = "/home/scripts_shell/OB_silent_start.sh";


	$process = proc_open($cmd, $descriptorspec, $pipes, realpath('./'), array());

	if (is_resource($process)) {
		while ($x = fgets($pipes[1])) {
			$x = str_replace("</br>","",$x) ;
			$x = str_replace("\r","",$x) ;
			$x = str_replace("\n","",$x) ;
			//$x = str_replace("\r\n\r\n","\r\n",$x) ;
			echo($x);echo("<br>");
			flush();
		}
	}
	sleep(1);
	echo("<br>");flush();
	
?>
