Home  >  Article  >  Backend Development  >  php采集如何获取<li>标签中<A>标签里面的连接

php采集如何获取<li>标签中<A>标签里面的连接

WBOY
WBOYOriginal
2016-06-13 10:47:53754browse

php采集怎么获取

  • 标签中标签里面的连接


    ------解决方案--------------------
    PHP code
    preg_match('/href="([^"]*)"/',$html,$match)<br><font color="#e78608">------解决方案--------------------</font><br>
    PHP code
    preg_match('/href="(.+\.html)"/i',$str,$result);echo $result[1];<div class="clear">
                     
                  
                  
            
                </div>
  • Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn