欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

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

程序员文章站 2022-03-02 10:05:06
...
参考:http://www.netasp.com.cn/valley/gettitle/index.php

代码如下:
 

//get_title.php
$file=file("http://www.netasp.com.cn");
$count=count($file);

for($i=0;$i if(eregi("(.*)",$file[$i],$out)){
$title=$out[0];
}
}

$title=substr($title,7,-8);
echo $title;
?>


【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】
相关标签: 截获 网站