I am sending some data to php through ajax and I am running a jar file with cmd. I want the live output from the console command.
I am trying my code and in console.log() it only outputs blank;
chdir("C:/Users/Dan/Desktop");
ob_end_flush();
ini_set("output_buffering", "0");
ob_implicit_flush(true);
$cmd = "java -jar auto.jar";
$proc = popen($cmd, 'r');
while (!feof($proc))
{
echo fread($proc, 4096);
}