Use the php DOM function to capture simple single-page information (here we do our best to capture the tag, the function is implemented, but the extension Page Link crawling is not implemented, you are welcome to criticize and guide)
<? Php
Error_reporting (E_ERROR );
$ Pages = file_get_contents ('HTTP: // www.php100.com ');
// $ Pages = htmlspecialchars ($ pages );
$ Doc = new DOMDocument ();
$ New_doc = new DOMDocument ('1. 0', 'utf-8 ');
$ Doc-> loadhtml ($ pages );
$ Dom = $ doc-> getElementsByTagName ('A ');
For ($ I = 0; $ I <$ dom-> length; $ I ++ ){
$ Node = $ new_doc-> createElement ('A', $ dom-> item ($ I)-> nodeValue );
$ Newnode = $ new_doc-> appendChild ($ node );
$ Newnode-> setAttribute ('href ', $ dom-> item ($ I)-> getAttribute ('href '));
$ Newnode-> setAttribute ('style', 'display: block; margin-left: 30px; '); // echo $ dom-> item ($ I) -> getAttribute ('src '). '</br> ';
}
Echo $ new_doc-> saveHTML ();
?>