Reputation: 74
I am using this function for getting contents from Remote URL
function get_contents($purl)
{
$ch = curl_init($purl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$curl_scraped_page = curl_exec($ch);
curl_close($ch);
$page = $curl_scraped_page;
return $page;
}
It get content nicely but the one which uses Javascript to load. It remains same like
<div id="content"></div>
I want the inside content also.
I want a function which get content after loading of all js.
Upvotes: 1
Views: 840
Reputation: 298
If the content in in html element is filled by ajax, you will need to intercept the ajax response or you will need to identify the javascript method that populates the content in html.
Upvotes: 1