You could delve into the IDE source and find what it does to reset the Arduino.
Or maybe put your Arduino into a loop until you receive a certain string from the PHP script.
Your PHP can connect and send the string with each retry separated by a delay.
Once the communication is finished the Arduino can continue looking for the connect string.