A
A
Alexey Vasiliev2017-06-06 11:08:48
PHP
Alexey Vasiliev, 2017-06-06 11:08:48

How to download a page via cURL+PHP without JavaScript generated data?

There is a page on which the data I need is generated using php, but in addition, using js, it generates something that I don’t need and this significantly slows down the download.
Question: how to download a page using curl with js disabled?
PS I use these settings, the page comes with js-data:

curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt ($ch, CURLOPT_HEADER, 0);

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Vasiliev, 2017-06-06
@Hoys

The issue is resolved, I didn’t see where the data I don’t need is coming from, js has nothing to do with it

A
Alexander Aksentiev, 2017-06-06
@Sanasol

curl doesn't use JS.
All that needs to be chosen is already done by hand from the code.

N
Nurlan, 2017-06-06
@daager

cURL doesn't interpret JS...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question