Is there a way to let cURL wait until the page's dynamic updates are done?

cURL does not execute any JavaScript or download any files referenced in the document. So cURL is not the solution for your problem.

You'll have to use a browser on the server side, tell it to load the page, wait for X seconds and then ask it to give you the HTML.

Look at: http://phantomjs.org/ (you'll need to use node.js, I'm not aware of any PHP solutions).


Not knowing a lot about the page you are retrieving or the calculations you want to include, but it could be an option to cURL straight to the URL serving those ajax requests. Use something like Firebug to inspect the Ajax calls being made on your target page and you can figure out the URL and any parameters passed. If you do need the full web page, maybe you can cURL both the web page and the Ajax URL and combine the two in your PHP code, but then it starts to get messy.