Hello Readers!
If you want to parse any HTML page then you would you "Simple HTML DOM Parser".
How to get HTML elements:
Create DOM from URL or file
$html = file_get_html('http://www.example.com/');
Find all images
foreach($html->find('img') as $element)
echo $element->src . '<br>';
Find all links
foreach($html->find('a') as $element)
echo $element->href . '<br>';
0 Comment(s)