How to use curl get HTML code of webpage that include ajax(lazy load)? -


i use curl html code of webpage server side.

this part of code

curl_setopt($this->ch, curlopt_returntransfer, 1);     curl_setopt($this->ch, curlopt_url, $this->url);     curl_setopt($this->ch, curlopt_followlocation, true);     curl_setopt($this->ch, curlopt_binarytransfer, $this->binary); 

but can not html code include ajax or somthing web page.

look at <div id="pdimgs"></div>

when use script show nothing in truth has html code between div.

how can curl or other?

the tag loaded dynamically javascript or ajax. tag empty in source code. since curl can not execute javascript needed load data asynchronously. tag empty.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -