This question already has an answer here:
I'm doing the Parser of a page with the 'simple_html_dom' library however not got success to parse an html whose content is obtained through ajax. is there any way around this?
PHP Code:
<?php
require_once '../library/Simple_HTML_DOM/simple_html_dom.php';
// Create DOM from URL or file
$html = file_get_html('http://www.playnow3dgames.com/genre.php?id=sports');
// Find all images
foreach($html->find('img') as $element){
echo $element->src . '<br>';
}
?>
Only prints the images on the edges and top (html native) and Is not parsed the center images (using ajax).
</div>