I have a PHP script that executes a .bat file using
system("cmd /c C:\dir\file.bat");
This launches an AWS server and returns info such as the id of the server started. I need to use this id in the script later on. How can I return the results from the .bat file to PHP and then how can I extract the id from the rest of the results. Is the returned data simply a string that i need to slice to get the bit i need?
I will then run a .bat file that executes the following -
ec2-associate-address -i i-######id ip.###.###.###
Thanks all