I want to take content of #result
from this page,but that div is being loaded after the page is loaded.Now i use this code
$url = 'http://www.fantasynamegenerators.com/alien-names.php#.WaBXGZOg-9Y';
$content = file_get_contents($url);
$first_step = explode( '<div id="result">' , $content );
$second_step = explode("</div>" , $first_step[1] );
To get content of that div,but because that div is getting loaded after the page,it returns the whole page.Now how can i tell php to wait till the page is fully loaded and then take it's content