I have this problem for several days ... I need to download the entire html page from php. There is a jquery function on this page that is called when the whole page loads. This function loads another html into the page, so I need to load all the loaded html (the part loaded by jquery). I can know that I get the whole page trying to find a tag loaded only from jquery. (for example: entering a tag with the name XXX, entering a tag with a multiple attribute, etc.)
so i try:
$html = file_get_contents("http://wwww.siteToScrape.com");
if (strpos($html, 'multiple') !== false) {
echo 'found';
} else {
echo 'not found';
}
but the result is "not found".
Then I downloaded a simple html dom and try:
include 'simple_html_dom.php';
$html = file_get_html("http://wwww.siteToScrape.com");
if (strpos($html, 'multiple') !== false) {
echo 'found';
} else {
echo 'not found';
}
but the result is still "not found."
, php script, ( jquery ), PHP able Web Browser :
require_once('browser.php');
$browser = new SimpleBrowser();
$p = $browser->get('http://wwww.siteToScrape.com');
if (strpos($p, 'multiple') !== false) {
echo 'found';
} else {
echo 'not found';
}
.
, .. - ??? !!!!