Answer the question
In order to leave comments, you need to log in
How to get the content of a page that is loaded via AJAX?
Hello dear.
There is a task.
Get page content in PHP.
I used to do this fairly easily via file_get_contents( $url ). But on one site, the list of goods is loaded by ajax-om, or rather by angular. That is, if you open such a page in a browser, you will have a loader spinning and after a while goods will appear.
The file_get_contents( $url ) function gets the raw code, i.e. like
<div class="spisok" data-ng-repeat="tovar in models.tovari">
<span>
{{tovari.name}}
</span><br/>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question