I'm new to PHP Data scraping, I've looked over the other threads and I couldn't find what I needed. I wanted to make a script that will constantly check a website if the infomation has changed, at the same time get the infomation. For example: google.com I want to grab just the "Google Search" but at the same time, it will check every so often incase it has changed. Cheers!
$html = file_get_contents( $url);
libxml_use_internal_errors( true);
$doc = new DOMDocument;
$doc->loadHTML( $html);
$xpath = new DOMXpath( $doc);
$node = $xpath->query( '//div[@name="jsb"]')->item( 0);
echo $node->textContent;