How to find all links on a page?

You need to find all the links on the page and write down their parameters (href, rel, title, etc.). What can be done?


Answer 1, authority 100%

Almost like jquery 🙂

http://simplehtmldom.sourceforge.net/

Added.

//  DOM  URL
$html = file_get_html('http://yandex.ru/');
//    
foreach($html->find('a') as $element) 
       echo $element->href . '<br>';