I've currently got this code so far:
<?php
$curl = curl_init('WebHere');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
$page = curl_exec($curl);
if(curl_errno($curl))
{
echo 'Scraper error: ' . curl_error($curl);
exit;
}
curl_close($curl);
$regex = '/<div class="stockinfo1">(.*?)<\/div>/s';
if ( preg_match($regex, $page, $list) )
echo $list[0];
else
print "Not found";
?>
I'm trying to target a specific piece of a website, it's in a div class named stockinfo1 how can I pull only that infomation, without the full website?