Is it possible to make PHP wait for file() to load a page? It's just that the page I am loading (url) has dynamic content that is loaded by Ajax.
So what? How this "waiting" gonna help?
No, PHP has no part to play once the page data is sent to the browser.
So I guess there is no way to wait for this data to load?
You can use output buffering to capture what the php script is going to send to the web browser, but that is completely separate from the ajax side of things.