I have an application which is in java & i have created a batch file(.bat) of that application & running it in php like this
<?php
system ("cmd.exe /c final.bat");
?>
The output is something like this
C:\wamp\www\php>java -jar Most closely reseambling is this…C:\wamp\www\php>pause Press any key to continue . . .
I am invoking this through my android application & want this out as response…Can you tell me how to do this …. It would be great if I would be able to eliminate prompts from response.
Check out the exec function. Instead of automatically printing the output, it will return the output as a string, or in an optional array of lines in the second argument. You can then parse this string or array and print only what you need.
Example which would print all but the first line of output: