D
D
Deterrent2016-12-29 20:27:28
PHP
Deterrent, 2016-12-29 20:27:28

How to parse an entire page in php that is loaded via js?

Getting the whole page in PHP is very easy, there is file_get_contents for this.
But how to get the whole page if it is loadable?
those. when scrolling to the bottom of the page, more content is loaded, and there are about 5-6 such loads ...
How to load the entire page in PHP first, and then get all of its html.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Stalker_RED, 2016-12-29
@Stalker_RED

Short answer: no way. Of course, you can try to write a parser specifically for your case, but it's easier to use something like PhantomJS .

A
Alexander Aksentiev, 2016-12-29
@Sanasol

Make direct requests to where the content comes from to the site, and not download the site itself.
Otherwise, nothing from php. Browser emulator only.

A
Andrew, 2016-12-29
@mhthnz

selenium+php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question