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

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

WBOY
Release: 2016-06-13 13:12:33
Original
1148 people have browsed it

php采集怎么获取

  • 标签中标签里面的连接


    ------解决方案--------------------
    PHP code
    
    
    preg_match('/href="([^"]*)"/',$html,$match)
    <br><font color="#e78608">------解决方案--------------------</font><br>
    
    Copy after login
    PHP code
    
    preg_match('/href="(.+\.html)"/i',$str,$result);
    echo $result[1]; <div class="clear">
                     
                  
                  
            
                </div>
    Copy after login
  • Related labels:
    source:php.cn
    Statement of this Website
    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
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template