Home > php教程 > php手册 > body text

截获网站title标签之家内容的例子

WBOY
Release: 2016-06-13 12:37:59
Original
1054 people have browsed it

参考:http://www.netasp.com.cn/valley/gettitle/index.php

代码如下:

 <br> <br>//get_title.php <br>$file=file("http://www.netasp.com.cn"); <br>$count=count($file); <br><br>for($i=0;$i  if(eregi("<title>(.*)</title>",$file[$i],$out)){ <br>  $title=$out[0]; <br>  } <br>} <br><br>$title=substr($title,7,-8); <br>echo $title; <br>?> <br>
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!