I am trying to retrieve the page source of a page on another domain after it has loaded the content it gathers asynchronously.
I have tried PHP's file_get_contents, but this does not obtain the source code after the asynchronous data is loaded.
Any help is appreciated.
There is no way you can do that using PHP's file_get_contents
or even using cURL
. You have to look into other options.
Like, PHP's V8js module: http://php.net/manual/en/book.v8js.php
or you can try to use Selenium.
What you are looking for is basically a way to execute the JavaScript from with in php.
Ofcourse you could always peep into the asynchronous requests on the page, and make your own requests too!