I am trying to create a simple alert app for some friends.
Basically i want to be able to extract data \"price\" and \"stock availability\" from a webpage like the f
The simplest method to extract data from Website. I've analysed that my all data is covered within tag only, so I've prepared this one.
load_file($page);
// Find all links
$links = array();
//Within find() function, I have written h3 so it will simply fetch the content from tag only. Change as per your requirement.
foreach($html->find(‘h3′) as $element)
{
$links[] = $element;
}
reset($links);
//$out will be having each of HTML element content you searching for, within that web page
foreach ($links as $out)
{
echo $out;
}
?>