<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_14761"> <div class="blockcode"> <div id="code_C6L"><ol> <li><?php<li> function dump_urls(tidy_node $node, &$urls = NULL) {<li> $urls = (is_array($urls)) ? $urls : array();<li><li> if(isset($node->id)) {<li> if($node->id == TIDY_TAG_A) {<li> $urls[] = $node->attribute[' href'];<li> }<li> }<li><li> if($node->hasChildren()) {<li> foreach($node->child as $child) {<li> dump_urls($child, $urls);<li> }<li> } <li> return $urls;<li> }<li><li> $tidy = tiny_parse_file("http://www.php.net/");<li> $urls = dump_urls($tidy->body());</li> <li> print_r($urls) ;</li> <li>?></li> </ol></div> <em onclick="copycode($('code_C6L'));">复制代</em> </div> </td></tr></table> <div id="comment_14761" class="cm"> </div> <div id="post_rate_div_14761"></div> <br><br>