That isn't the correct solution to me. Stalling your app just because of a timing issue punishes everyone. I see a couple of options.
- The PHP app should insert the record into the DB and then open the browser window. Since it doesn't call the other site until after the insert then there shouldn't be a timing issue. You said it didn't work for you but you didn't say why. If the DB insert is async then you'll need to wait for the task to complete. Posting code could be useful here.
- Have the second site check for the record. If it doesn't find it then poll for some reasonable amount of time (say 30 seconds) before failing the call.
There are other options as well but these seem the simplest.